mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Coding fixes
This commit is contained in:
@@ -1623,6 +1623,7 @@ ios_extension(
|
||||
":MtProtoKitFramework",
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
":TelegramCoreFramework",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ swift_library(
|
||||
"Sources/*.swift",
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/MtProtoKit:MtProtoKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
|
||||
@@ -2,6 +2,8 @@ import Foundation
|
||||
import UserNotifications
|
||||
import SwiftSignalKit
|
||||
import NotificationServiceObjC
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
|
||||
private let queue = Queue()
|
||||
|
||||
@@ -18,9 +20,6 @@ final class NotificationService: UNNotificationServiceExtension {
|
||||
f()
|
||||
}
|
||||
}, countIncomingMessage: { rootPath, accountId, encryptionParameters, peerId, messageId in
|
||||
/*SyncProviderImpl.addIncomingMessage(queue: queue, withRootPath: rootPath, accountId: accountId, encryptionParameters: encryptionParameters, peerId: peerId, messageId: messageId, completion: { count in
|
||||
completion?(count)
|
||||
})*/
|
||||
completion?(0)
|
||||
}, isLocked: { rootPath in
|
||||
return SyncProviderImpl.isLocked(withRootPath: rootPath)
|
||||
|
||||
@@ -779,6 +779,8 @@ public final class PostboxDecoder {
|
||||
offset += 1
|
||||
|
||||
if keyLength != Int(readKeyLength) {
|
||||
/*let keyString = String(data: Data(bytes: bytes + (offset - Int(readKeyLength) - 1), count: Int(readKeyLength)), encoding: .utf8)
|
||||
print("\(String(describing: keyString))")*/
|
||||
skipValue(bytes, offset: &offset, length: length, valueType: ValueType(rawValue: readValueType)!)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -19,6 +19,10 @@ final public class AdaptedPostboxDecoder {
|
||||
self.data = data
|
||||
self.typeHash = typeHash
|
||||
}
|
||||
|
||||
public init(from decoder: Decoder) throws {
|
||||
preconditionFailure()
|
||||
}
|
||||
}
|
||||
|
||||
public init() {
|
||||
|
||||
@@ -10,6 +10,10 @@ public class AdaptedPostboxEncoder {
|
||||
self.typeHash = typeHash
|
||||
self.data = data
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
preconditionFailure()
|
||||
}
|
||||
}
|
||||
|
||||
public init() {
|
||||
|
||||
Reference in New Issue
Block a user