Implement Story onboarding download job and message insertion.

This commit is contained in:
Alex Hart
2022-07-01 14:29:50 -03:00
committed by Greyson Parrelli
parent 2270dfaf21
commit 36ccf9ca54
17 changed files with 365 additions and 56 deletions

View File

@@ -8,6 +8,7 @@ import androidx.annotation.WorkerThread
import org.signal.core.util.logging.Log
import org.thoughtcrime.securesms.database.SignalDatabase
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
import org.thoughtcrime.securesms.keyvalue.SignalStore
import java.util.concurrent.TimeUnit
/**
@@ -43,7 +44,7 @@ class ExpiringStoriesManager(
@WorkerThread
override fun executeEvent(event: Event) {
val threshold = System.currentTimeMillis() - STORY_LIFESPAN
val deletes = mmsDatabase.deleteStoriesOlderThan(threshold)
val deletes = mmsDatabase.deleteStoriesOlderThan(threshold, SignalStore.storyValues().userHasSeenOnboardingStory)
Log.i(TAG, "Deleted $deletes stories before $threshold")
}