Fix bazel linking

This commit is contained in:
Ali 2020-10-15 00:18:40 +04:00
parent 04fbe1832d
commit 0b13fe22b5
3 changed files with 14 additions and 0 deletions

View File

@ -3,6 +3,10 @@ import Postbox
import SyncCore
// Incuding at least one Objective-C class in a swift file ensures that it doesn't get stripped by the linker
private final class LinkHelperClass: NSObject {
}
public func canSendMessagesToPeer(_ peer: Peer) -> Bool {
if peer is TelegramUser || peer is TelegramGroup {
return !peer.isDeleted

View File

@ -2,6 +2,10 @@ import Foundation
import Postbox
import CryptoUtils
// Incuding at least one Objective-C class in a swift file ensures that it doesn't get stripped by the linker
private final class LinkHelperClass: NSObject {
}
public extension MemoryBuffer {
func md5Digest() -> Data {
return CryptoMD5(self.memory, Int32(self.length))

View File

@ -1,3 +1,9 @@
import Foundation
// Incuding at least one Objective-C class in a swift file ensures that it doesn't get stripped by the linker
private final class LinkHelperClass: NSObject {
}
public func dataSizeString(_ size: Int, forceDecimal: Bool = false, decimalSeparator: String = ".") -> String {
return dataSizeString(Int64(size), forceDecimal: forceDecimal, decimalSeparator: decimalSeparator)
}