Avoid uploading onboarding story media during restore.

This commit is contained in:
Michelle Tang
2025-06-16 15:00:22 -04:00
parent b35b1db4bc
commit 2c752ab5ba
3 changed files with 6 additions and 2 deletions

View File

@@ -86,6 +86,7 @@ import org.thoughtcrime.securesms.jobmanager.Job
import org.thoughtcrime.securesms.jobs.AvatarGroupsV2DownloadJob
import org.thoughtcrime.securesms.jobs.BackupDeleteJob
import org.thoughtcrime.securesms.jobs.CheckRestoreMediaLeftJob
import org.thoughtcrime.securesms.jobs.CreateReleaseChannelJob
import org.thoughtcrime.securesms.jobs.RequestGroupV2InfoJob
import org.thoughtcrime.securesms.jobs.RestoreAttachmentJob
import org.thoughtcrime.securesms.jobs.RestoreOptimizedMediaJob
@@ -1082,6 +1083,8 @@ object BackupRepository {
RetrieveProfileJob.enqueue(recipientIds)
AppDependencies.jobManager.add(CreateReleaseChannelJob.create())
val groupJobs = SignalDatabase.groups.getGroups().use { groups ->
val jobs = mutableListOf<Job>()
groups

View File

@@ -49,7 +49,8 @@ class StoryOnboardingDownloadJob private constructor(parameters: Parameters) : B
}
fun enqueueIfNeeded() {
if (SignalStore.story.hasDownloadedOnboardingStory) {
if (SignalStore.story.hasDownloadedOnboardingStory || SignalStore.story.userHasViewedOnboardingStory) {
Log.i(TAG, "Skipping because user has already viewed the onboarding story or it is already downloaded")
return
}

View File

@@ -135,7 +135,7 @@ class StoryViewerFragment :
} else {
viewModel.refresh()
if (!SignalStore.story.userHasSeenFirstNavView) {
if (!SignalStore.story.userHasSeenFirstNavView && !SignalStore.story.userHasViewedOnboardingStory) {
StoryFirstTimeNavigationFragment().show(childFragmentManager, null)
}
}