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