Fix double start of restore session
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.
This commit is contained in:
parent
d7f985ba8a
commit
640f5b73c6
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue