[WIP] Stories

This commit is contained in:
Ali
2023-06-10 00:29:41 +04:00
parent 749023af1f
commit 8a09cd5f70
12 changed files with 433 additions and 24 deletions

View File

@@ -666,6 +666,18 @@ final class MutableMessageHistoryView {
hasChanges = true
}
}
if !transaction.storyEvents.isEmpty {
var updatedStories = Set<StoryId>()
for event in transaction.storyEvents {
switch event {
case let .updated(id):
updatedStories.insert(id)
}
}
if loadedState.updateStories(postbox: postbox, updatedStories: updatedStories) {
hasChanges = true
}
}
}
if hasChanges {