Skip to content

Commit

Permalink
Fix double start of restore session
Browse files Browse the repository at this point in the history
We emit the install result of APKs at least two times. When there is no APKs to install, because APK backup was disabled, we would start the restore of app data two times.

This fix waits until the emitted install result is considered finished, so we only start data restore once.
  • Loading branch information
grote authored and chirayudesai committed Nov 28, 2023
1 parent d7f985b commit 640f5b7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ class InstallProgressFragment : Fragment(), InstallItemListener {

private fun onInstallResult(installResult: InstallResult) {
// skip this screen, if there are no apps to install
if (installResult.isEmpty) viewModel.onNextClickedAfterInstallingApps()
if (installResult.isFinished && installResult.isEmpty) {
viewModel.onNextClickedAfterInstallingApps()
}

// if finished, treat all still queued apps as failed and resort/redisplay adapter items
if (installResult.isFinished) {
Expand Down

0 comments on commit 640f5b7

Please sign in to comment.