mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-28 23:09:42 +00:00
no message
This commit is contained in:
@@ -137,7 +137,6 @@
|
||||
D0B4184E1D7DFE20004562A4 /* MessageHistoryHolesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B8B1D65D488002C78E7 /* MessageHistoryHolesView.swift */; };
|
||||
D0B4184F1D7DFE20004562A4 /* ChatListHolesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B8D1D65D49C002C78E7 /* ChatListHolesView.swift */; };
|
||||
D0B418501D7DFE20004562A4 /* UnsentMessageIndicesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B8F1D65D4AB002C78E7 /* UnsentMessageIndicesView.swift */; };
|
||||
D0B418561D7DFE29004562A4 /* PostboxClientId.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D510FA1D63C06E00A97B8A /* PostboxClientId.swift */; };
|
||||
D0B418571D7DFE29004562A4 /* Postbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0E3A7811B28ADD000A402D9 /* Postbox.swift */; };
|
||||
D0B418581D7DFE29004562A4 /* SeedConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = D044CA291C617D39002160FF /* SeedConfiguration.swift */; };
|
||||
D0B418591D7DFE29004562A4 /* PostboxTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D510F31D63BA8400A97B8A /* PostboxTransaction.swift */; };
|
||||
@@ -166,12 +165,17 @@
|
||||
D0D510F41D63BA8400A97B8A /* PostboxTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D510F31D63BA8400A97B8A /* PostboxTransaction.swift */; };
|
||||
D0D510F61D63BBE100A97B8A /* MessageHistoryOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D510F51D63BBE100A97B8A /* MessageHistoryOperation.swift */; };
|
||||
D0D510F91D63BCC200A97B8A /* IntermediateMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D510F81D63BCC200A97B8A /* IntermediateMessage.swift */; };
|
||||
D0D510FB1D63C06E00A97B8A /* PostboxClientId.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D510FA1D63C06E00A97B8A /* PostboxClientId.swift */; };
|
||||
D0D511001D64A58900A97B8A /* IpcPipe.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D510FF1D64A58900A97B8A /* IpcPipe.swift */; };
|
||||
D0D511021D64D73D00A97B8A /* IpcNotifier.mm in Sources */ = {isa = PBXBuildFile; fileRef = D0D511011D64D73D00A97B8A /* IpcNotifier.mm */; };
|
||||
D0D511041D64D91C00A97B8A /* IpcNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D511031D64D75200A97B8A /* IpcNotifier.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D0D949F31D35302600740E02 /* RandomAccessResourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D949F21D35302600740E02 /* RandomAccessResourceTests.swift */; };
|
||||
D0D949F51D35353900740E02 /* MappedFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D949F41D35353900740E02 /* MappedFile.swift */; };
|
||||
D0DA44411E4C7868005FDCA7 /* IncrementalUpgrade.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0DA44401E4C7868005FDCA7 /* IncrementalUpgrade.swift */; };
|
||||
D0DA44421E4C7868005FDCA7 /* IncrementalUpgrade.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0DA44401E4C7868005FDCA7 /* IncrementalUpgrade.swift */; };
|
||||
D0DA44451E4C798E005FDCA7 /* IncrementalUpgrade_v11_v12.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0DA44441E4C798E005FDCA7 /* IncrementalUpgrade_v11_v12.swift */; };
|
||||
D0DA44461E4C798E005FDCA7 /* IncrementalUpgrade_v11_v12.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0DA44441E4C798E005FDCA7 /* IncrementalUpgrade_v11_v12.swift */; };
|
||||
D0DA44481E4C7D1E005FDCA7 /* PostboxAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0DA44471E4C7D1E005FDCA7 /* PostboxAccess.swift */; };
|
||||
D0DA44491E4C7D1E005FDCA7 /* PostboxAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0DA44471E4C7D1E005FDCA7 /* PostboxAccess.swift */; };
|
||||
D0DF0C8F1D81A350008AEB01 /* PeerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0DF0C8E1D81A350008AEB01 /* PeerView.swift */; };
|
||||
D0E1DE151C5E1C6900C7826E /* ViewTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0E1DE141C5E1C6900C7826E /* ViewTracker.swift */; };
|
||||
D0E3A7501B28A7E300A402D9 /* Postbox.h in Headers */ = {isa = PBXBuildFile; fileRef = D0E3A74F1B28A7E300A402D9 /* Postbox.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -340,12 +344,14 @@
|
||||
D0D510F31D63BA8400A97B8A /* PostboxTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostboxTransaction.swift; sourceTree = "<group>"; };
|
||||
D0D510F51D63BBE100A97B8A /* MessageHistoryOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageHistoryOperation.swift; sourceTree = "<group>"; };
|
||||
D0D510F81D63BCC200A97B8A /* IntermediateMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntermediateMessage.swift; sourceTree = "<group>"; };
|
||||
D0D510FA1D63C06E00A97B8A /* PostboxClientId.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostboxClientId.swift; sourceTree = "<group>"; };
|
||||
D0D510FF1D64A58900A97B8A /* IpcPipe.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IpcPipe.swift; sourceTree = "<group>"; };
|
||||
D0D511011D64D73D00A97B8A /* IpcNotifier.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IpcNotifier.mm; sourceTree = "<group>"; };
|
||||
D0D511031D64D75200A97B8A /* IpcNotifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IpcNotifier.h; sourceTree = "<group>"; };
|
||||
D0D949F21D35302600740E02 /* RandomAccessResourceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RandomAccessResourceTests.swift; sourceTree = "<group>"; };
|
||||
D0D949F41D35353900740E02 /* MappedFile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MappedFile.swift; sourceTree = "<group>"; };
|
||||
D0DA44401E4C7868005FDCA7 /* IncrementalUpgrade.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IncrementalUpgrade.swift; sourceTree = "<group>"; };
|
||||
D0DA44441E4C798E005FDCA7 /* IncrementalUpgrade_v11_v12.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IncrementalUpgrade_v11_v12.swift; sourceTree = "<group>"; };
|
||||
D0DA44471E4C7D1E005FDCA7 /* PostboxAccess.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostboxAccess.swift; sourceTree = "<group>"; };
|
||||
D0DF0C8E1D81A350008AEB01 /* PeerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerView.swift; sourceTree = "<group>"; };
|
||||
D0E1DE141C5E1C6900C7826E /* ViewTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewTracker.swift; sourceTree = "<group>"; };
|
||||
D0E3A74A1B28A7E300A402D9 /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -465,6 +471,23 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0DA443F1E4C7834005FDCA7 /* Upgrade */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DA44431E4C796C005FDCA7 /* v11-v12 */,
|
||||
D0DA44401E4C7868005FDCA7 /* IncrementalUpgrade.swift */,
|
||||
);
|
||||
name = Upgrade;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0DA44431E4C796C005FDCA7 /* v11-v12 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DA44441E4C798E005FDCA7 /* IncrementalUpgrade_v11_v12.swift */,
|
||||
);
|
||||
name = "v11-v12";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0E1DE161C5EB06000C7826E /* Tables */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -614,6 +637,7 @@
|
||||
D0E3A74C1B28A7E300A402D9 /* Postbox */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DA443F1E4C7834005FDCA7 /* Upgrade */,
|
||||
D075163D1B2D9CEF00AE42E0 /* PostboxPrivate */,
|
||||
D07515FC1B2C44A200AE42E0 /* thirdparty */,
|
||||
D0E1DE181C5EB09300C7826E /* Utils */,
|
||||
@@ -622,8 +646,8 @@
|
||||
D0E1DE161C5EB06000C7826E /* Tables */,
|
||||
D0E1DE1A1C5EB0DB00C7826E /* Views */,
|
||||
D05F09981C9CAC1100BB6F96 /* Media Box */,
|
||||
D0D510FA1D63C06E00A97B8A /* PostboxClientId.swift */,
|
||||
D0E3A7811B28ADD000A402D9 /* Postbox.swift */,
|
||||
D0DA44471E4C7D1E005FDCA7 /* PostboxAccess.swift */,
|
||||
D044CA291C617D39002160FF /* SeedConfiguration.swift */,
|
||||
D0D510F31D63BA8400A97B8A /* PostboxTransaction.swift */,
|
||||
D0E1DE141C5E1C6900C7826E /* ViewTracker.swift */,
|
||||
@@ -833,6 +857,7 @@
|
||||
D050F2661E4A5B5A00988324 /* MessageGloballyUniqueIdTable.swift in Sources */,
|
||||
D050F2671E4A5B5A00988324 /* TimestampBasedMessageAttributesTable.swift in Sources */,
|
||||
D050F2681E4A5B5A00988324 /* TimestampBasedMessageAttributesIndexTable.swift in Sources */,
|
||||
D0DA44421E4C7868005FDCA7 /* IncrementalUpgrade.swift in Sources */,
|
||||
D050F2691E4A5B5A00988324 /* MultiplePeersView.swift in Sources */,
|
||||
C2A315BE1E2E733900D89000 /* PeerMergedOperationLogIndexTable.swift in Sources */,
|
||||
C2A315BF1E2E733900D89000 /* PeerMergedOperationLogView.swift in Sources */,
|
||||
@@ -868,7 +893,6 @@
|
||||
D0F7B1CC1E045C6A007EB8A5 /* ChatListIndexTable.swift in Sources */,
|
||||
D0B4185E1D7DFE54004562A4 /* IpcNotifier.mm in Sources */,
|
||||
D0F7B1D31E045C6A007EB8A5 /* CachedPeerDataTable.swift in Sources */,
|
||||
D0B418561D7DFE29004562A4 /* PostboxClientId.swift in Sources */,
|
||||
D0F7B1D51E045C6A007EB8A5 /* PeerChatStateTable.swift in Sources */,
|
||||
D0F82CFE1E4345D7007E499C /* OrderedItemListTable.swift in Sources */,
|
||||
D0F7B1C51E045C6A007EB8A5 /* MessageHistoryMetadataTable.swift in Sources */,
|
||||
@@ -901,6 +925,7 @@
|
||||
D0F7B1DE1E045C6A007EB8A5 /* PeerChatTopIndexableMessageIds.swift in Sources */,
|
||||
D0B4184A1D7DFE20004562A4 /* UnsentMessageHistoryView.swift in Sources */,
|
||||
D0B418231D7DFE0C004562A4 /* SimpleDictionary.swift in Sources */,
|
||||
D0DA44461E4C798E005FDCA7 /* IncrementalUpgrade_v11_v12.swift in Sources */,
|
||||
D0B4185C1D7DFE2F004562A4 /* MurMurHash32.m in Sources */,
|
||||
D0F7B1E01E045C6A007EB8A5 /* ItemCacheTable.swift in Sources */,
|
||||
D0F7B1E11E045C6A007EB8A5 /* ReverseIndexReferenceTable.swift in Sources */,
|
||||
@@ -908,6 +933,7 @@
|
||||
D073CE7B1DCBF3B4007511FD /* PeerNameIndexRepresentation.swift in Sources */,
|
||||
D073CE7D1DCBF3B4007511FD /* PeerPresence.swift in Sources */,
|
||||
D0B4184C1D7DFE20004562A4 /* ContactPeerIdsView.swift in Sources */,
|
||||
D0DA44491E4C7D1E005FDCA7 /* PostboxAccess.swift in Sources */,
|
||||
D073CE751DCBF3B4007511FD /* Message.swift in Sources */,
|
||||
D087C20D1E43C11C00D686F8 /* OrderedItemListView.swift in Sources */,
|
||||
D00C7CD51E365C4E0080C3D5 /* PeerChatListInclusion.swift in Sources */,
|
||||
@@ -942,6 +968,7 @@
|
||||
D08775061E3E3F2100A97350 /* PreferencesView.swift in Sources */,
|
||||
D0F9E8631C579F0200037222 /* MediaCleanupTable.swift in Sources */,
|
||||
D0F3CC741DDE1EB9008148FA /* ItemCacheMetaTable.swift in Sources */,
|
||||
D0DA44411E4C7868005FDCA7 /* IncrementalUpgrade.swift in Sources */,
|
||||
D08D451F1D5D2CA700A7428A /* RatingTable.swift in Sources */,
|
||||
D07CFF831DCA909100761F81 /* PeerChatInterfaceStateTable.swift in Sources */,
|
||||
D0F9E86F1C5A0E7600037222 /* KeychainTable.swift in Sources */,
|
||||
@@ -1010,6 +1037,7 @@
|
||||
D033A6F71C73D512006A2EAB /* MessageHistoryUnsentTable.swift in Sources */,
|
||||
D00C7CD41E365C4E0080C3D5 /* PeerChatListInclusion.swift in Sources */,
|
||||
D0A18D671E16874D004C6734 /* UnreadMessageCountsView.swift in Sources */,
|
||||
D0DA44451E4C798E005FDCA7 /* IncrementalUpgrade_v11_v12.swift in Sources */,
|
||||
D0D511021D64D73D00A97B8A /* IpcNotifier.mm in Sources */,
|
||||
D0B844511DAC04FE005F29E1 /* PeerPresence.swift in Sources */,
|
||||
D07827C11E0079CB00071108 /* StringIndexTokens.swift in Sources */,
|
||||
@@ -1017,6 +1045,7 @@
|
||||
D08C713C1C51283C00779C0F /* MessageHistoryIndexTable.swift in Sources */,
|
||||
D019B1CF1E2E770700F80DB3 /* MessageGloballyUniqueIdTable.swift in Sources */,
|
||||
D0F9E86D1C5A0E5D00037222 /* MetadataTable.swift in Sources */,
|
||||
D0DA44481E4C7D1E005FDCA7 /* PostboxAccess.swift in Sources */,
|
||||
D0E3A7841B28AE0900A402D9 /* Peer.swift in Sources */,
|
||||
D0D510F61D63BBE100A97B8A /* MessageHistoryOperation.swift in Sources */,
|
||||
D0BC38721E409E670044D6FE /* RenderedPeer.swift in Sources */,
|
||||
@@ -1037,7 +1066,6 @@
|
||||
D055BD331B7D3D2D00F06C0A /* MediaBox.swift in Sources */,
|
||||
D0C674CC1CBB14A700183765 /* PeerReadState.swift in Sources */,
|
||||
D0D510F41D63BA8400A97B8A /* PostboxTransaction.swift in Sources */,
|
||||
D0D510FB1D63C06E00A97B8A /* PostboxClientId.swift in Sources */,
|
||||
D0977F9C1B822DB4009994B2 /* ValueBox.swift in Sources */,
|
||||
D07516441B2D9CEF00AE42E0 /* sqlite3.c in Sources */,
|
||||
D0D511001D64A58900A97B8A /* IpcPipe.swift in Sources */,
|
||||
|
||||
10
Postbox/IncrementalUpgrade.swift
Normal file
10
Postbox/IncrementalUpgrade.swift
Normal file
@@ -0,0 +1,10 @@
|
||||
import Foundation
|
||||
#if os(macOS)
|
||||
import SwiftSignalKitMac
|
||||
#else
|
||||
import SwiftSignalKit
|
||||
#endif
|
||||
|
||||
protocol IncrementalUpgrade {
|
||||
func upgrade(from previous: ValueBox, tmpBasePath: String) -> Signal<ValueBox, NoError>
|
||||
}
|
||||
15
Postbox/IncrementalUpgrade_v11_v12.swift
Normal file
15
Postbox/IncrementalUpgrade_v11_v12.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
import Foundation
|
||||
|
||||
#if os(macOS)
|
||||
import SwiftSignalKitMac
|
||||
#else
|
||||
import SwiftSignalKit
|
||||
#endif
|
||||
|
||||
final class IncrementalUpgrade_v11_v12: IncrementalUpgrade {
|
||||
func upgrade(from previous: ValueBox, tmpBasePath: String) -> Signal<ValueBox, NoError> {
|
||||
assertionFailure()
|
||||
|
||||
return .never()
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import Foundation
|
||||
import sqlcipher
|
||||
|
||||
#if os(macOS)
|
||||
import SwiftSignalKitMac
|
||||
@@ -488,15 +487,6 @@ public final class Postbox {
|
||||
|
||||
//#if TARGET_IPHONE_SIMULATOR
|
||||
|
||||
//self.debugRestoreState("_empty")
|
||||
|
||||
// debugging large amount of updates
|
||||
//self.debugSaveState("beforeHoles")
|
||||
//self.debugRestoreState("beforeHoles")
|
||||
|
||||
// debugging unread counters
|
||||
//self.debugRestoreState("afterLogin")
|
||||
|
||||
//self.debugSaveState(name: "previous")
|
||||
//self.debugRestoreState(name: "previous")
|
||||
|
||||
@@ -507,7 +497,7 @@ public final class Postbox {
|
||||
self.metadataTable = MetadataTable(valueBox: self.valueBox, table: MetadataTable.tableSpec(0))
|
||||
|
||||
let userVersion: Int32? = self.metadataTable.userVersion()
|
||||
let currentUserVersion: Int32 = 11
|
||||
let currentUserVersion: Int32 = 12
|
||||
|
||||
if userVersion != currentUserVersion {
|
||||
self.valueBox.drop()
|
||||
|
||||
23
Postbox/PostboxAccess.swift
Normal file
23
Postbox/PostboxAccess.swift
Normal file
@@ -0,0 +1,23 @@
|
||||
import Foundation
|
||||
#if os(macOS)
|
||||
import SwiftSignalKitMac
|
||||
#else
|
||||
import SwiftSignalKit
|
||||
#endif
|
||||
|
||||
public enum PostboxAuthorizationChallenge {
|
||||
case numericPassword(length: Int32)
|
||||
case arbitraryPassword()
|
||||
}
|
||||
|
||||
public enum PostboxAccess {
|
||||
case unlocked(Postbox)
|
||||
case locked(PostboxAuthorizationChallenge)
|
||||
}
|
||||
|
||||
public func accessPostbox(basePath: String, password: String?) -> Signal<PostboxAccess, NoError> {
|
||||
return Signal { subscriber in
|
||||
return ActionDisposable {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
public struct PostboxClientId {
|
||||
public let stableId: Int32
|
||||
|
||||
public init(stableId: Int32) {
|
||||
self.stableId = stableId
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user