1
0
Fork 0

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:
Torsten Grote 2023-11-27 09:01:55 -03:00
parent 392809274c
commit 81791497aa
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -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) {