Calendar improvements

This commit is contained in:
Ali
2021-10-06 01:41:25 +04:00
parent b1d4e7f259
commit a8940ebf68
23 changed files with 1604 additions and 98 deletions

View File

@@ -708,6 +708,15 @@ public final class Transaction {
assert(!self.disposed)
return self.postbox?.messageHistoryTable.findRandomMessage(peerId: peerId, namespace: namespace, tag: tag, ignoreIds: ignoreIds)
}
public func firstMessageInRange(peerId: PeerId, namespace: MessageId.Namespace, tag: MessageTags, timestampMax: Int32, timestampMin: Int32) -> Message? {
assert(!self.disposed)
if let message = self.postbox?.messageHistoryTable.firstMessageInRange(peerId: peerId, namespace: namespace, tag: tag, timestampMax: timestampMax, timestampMin: timestampMin) {
return self.postbox?.renderIntermediateMessage(message)
} else {
return nil
}
}
public func filterStoredMessageIds(_ messageIds: Set<MessageId>) -> Set<MessageId> {
assert(!self.disposed)