mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 12:17:22 +00:00
When we move to awaiting download state, display dialog.
This commit is contained in:
committed by
Cody Henthorne
parent
54a2628797
commit
5903551cdb
@@ -52,7 +52,6 @@ import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.rememberUpdatedState
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@@ -278,6 +277,10 @@ class RemoteBackupsSettingsFragment : ComposeFragment() {
|
||||
override fun onDisplayProgressDialog() {
|
||||
viewModel.requestDialog(RemoteBackupsSettingsState.Dialog.PROGRESS_SPINNER)
|
||||
}
|
||||
|
||||
override fun onDisplayDownloadingBackupDialog() {
|
||||
viewModel.requestDialog(RemoteBackupsSettingsState.Dialog.DOWNLOADING_YOUR_BACKUP)
|
||||
}
|
||||
}
|
||||
|
||||
private fun displayBackupKey() {
|
||||
@@ -365,6 +368,7 @@ private interface ContentCallbacks {
|
||||
fun onRestoreUsingCellularClick() = Unit
|
||||
fun onRedemptionErrorDetailsClick() = Unit
|
||||
fun onDisplayProgressDialog() = Unit
|
||||
fun onDisplayDownloadingBackupDialog() = Unit
|
||||
|
||||
object Emtpy : ContentCallbacks
|
||||
}
|
||||
@@ -398,6 +402,10 @@ private fun RemoteBackupsSettingsContent(
|
||||
if (backupDeleteState != DeletionState.NONE && backupDeleteState != DeletionState.CLEAR_LOCAL_STATE) {
|
||||
contentCallbacks.onDialogDismissed()
|
||||
}
|
||||
|
||||
if (backupDeleteState == DeletionState.AWAITING_MEDIA_DOWNLOAD) {
|
||||
contentCallbacks.onDisplayDownloadingBackupDialog()
|
||||
}
|
||||
}
|
||||
|
||||
Scaffold(
|
||||
|
||||
Reference in New Issue
Block a user