mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-30 01:11:46 +00:00
no message
This commit is contained in:
parent
cef4c95ace
commit
7a75c39e11
@ -30,7 +30,7 @@ public func ==(lhs: MediaResourceStatus, rhs: MediaResourceStatus) -> Bool {
|
||||
case let .Fetching(lhsProgress):
|
||||
switch rhs {
|
||||
case let .Fetching(rhsProgress):
|
||||
return abs(lhsProgress - rhsProgress) < FLT_EPSILON
|
||||
return lhsProgress.isEqual(to: rhsProgress)
|
||||
default:
|
||||
return false
|
||||
}
|
||||
|
@ -128,6 +128,9 @@ class MessageHistoryTagsSummaryTable: Table {
|
||||
if let current = self.get(key) {
|
||||
if !current.range.contains(id) {
|
||||
self.set(key, summary: current.withAddedCount(1), updatedSummaries: &updatedSummaries)
|
||||
if current.range.maxId == 0 {
|
||||
self.invalidateTable.insert(InvalidatedMessageHistoryTagsSummaryKey(peerId: key.peerId, namespace: key.namespace, tagMask: key.tag), operations: &invalidateSummaries)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
self.set(key, summary: MessageHistoryTagNamespaceSummary(version: 0, count: 1, range: MessageHistoryTagNamespaceCountValidityRange(maxId: 0)), updatedSummaries: &updatedSummaries)
|
||||
|
@ -6,11 +6,6 @@ import Foundation
|
||||
import SwiftSignalKit
|
||||
#endif
|
||||
|
||||
public enum PreloadedMessageHistoryView {
|
||||
case Loading
|
||||
case Preloaded(MessageHistoryView)
|
||||
}
|
||||
|
||||
public protocol PeerChatState: PostboxCoding {
|
||||
func equals(_ other: PeerChatState) -> Bool
|
||||
}
|
||||
@ -735,7 +730,7 @@ public func openPostbox(basePath: String, globalMessageIdsNamespace: MessageId.N
|
||||
let _ = try? FileManager.default.createDirectory(atPath: basePath, withIntermediateDirectories: true, attributes: nil)
|
||||
|
||||
//debugSaveState(basePath: basePath, name: "beforeHoles")
|
||||
debugRestoreState(basePath: basePath, name: "beforeHoles")
|
||||
//debugRestoreState(basePath: basePath, name: "beforeHoles")
|
||||
|
||||
loop: while true {
|
||||
let valueBox = SqliteValueBox(basePath: basePath + "/db", queue: queue)
|
||||
|
@ -400,7 +400,7 @@ final class ViewTracker {
|
||||
}
|
||||
}
|
||||
|
||||
if !transaction.chatListOperations.isEmpty || !transaction.currentUpdatedPeerNotificationSettings.isEmpty || !transaction.currentUpdatedPeers.isEmpty {
|
||||
if !transaction.chatListOperations.isEmpty || !transaction.currentUpdatedPeerNotificationSettings.isEmpty || !transaction.currentUpdatedPeers.isEmpty || !transaction.currentInvalidateMessageTagSummaries.isEmpty || !transaction.currentUpdatedMessageTagSummaries.isEmpty {
|
||||
for (mutableView, pipe) in self.chatListViews.copyItems() {
|
||||
let context = MutableChatListViewReplayContext()
|
||||
if mutableView.replay(transaction.chatListOperations, updatedPeerNotificationSettings: transaction.currentUpdatedPeerNotificationSettings, updatedPeers: transaction.currentUpdatedPeers, transaction: transaction, context: context) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user