Adapt StoryManager.setup() to warmCaches

This commit is contained in:
Max Radermacher 2023-04-10 17:40:41 -07:00
parent b1ad5152fc
commit f168cb82e4

View File

@ -12,13 +12,14 @@ public class StoryManager: NSObject {
@objc
public class func setup() {
AppReadiness.runNowOrWhenAppDidBecomeReadyAsync {
cacheAreStoriesEnabled()
cacheAreViewReceiptsEnabled()
cacheAreStoriesEnabled()
cacheAreViewReceiptsEnabled()
// Create My Story thread if necessary
AppReadiness.runNowOrWhenAppDidBecomeReadyAsync {
Self.databaseStorage.asyncWrite { transaction in
// Create My Story thread if necessary
TSPrivateStoryThread.getOrCreateMyStory(transaction: transaction)
if CurrentAppContext().isMainApp {
TSPrivateStoryThread.cleanupDeletedTimestamps(transaction: transaction)
}