mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Fix hot loop when trying to delete stories but only onboarding exists.
This commit is contained in:
committed by
Cody Henthorne
parent
15111b2792
commit
2f17963b2b
@@ -32,7 +32,7 @@ class ExpiringStoriesManager(
|
||||
|
||||
@WorkerThread
|
||||
override fun getNextClosestEvent(): Event? {
|
||||
val oldestTimestamp = mmsDatabase.oldestStorySendTimestamp ?: return null
|
||||
val oldestTimestamp = mmsDatabase.getOldestStorySendTimestamp(SignalStore.storyValues().userHasSeenOnboardingStory) ?: return null
|
||||
|
||||
val timeSinceSend = System.currentTimeMillis() - oldestTimestamp
|
||||
val delay = (STORY_LIFESPAN - timeSinceSend).coerceAtLeast(0)
|
||||
|
||||
Reference in New Issue
Block a user