diff --git a/SignalServiceKit/src/Messages/Stories/StoryManager.swift b/SignalServiceKit/src/Messages/Stories/StoryManager.swift index 6f71c09365..6cfae98ce6 100644 --- a/SignalServiceKit/src/Messages/Stories/StoryManager.swift +++ b/SignalServiceKit/src/Messages/Stories/StoryManager.swift @@ -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) }