Skip to content

Commit 07e14b7

Browse files
committed
Fixed removing files from recent files (backup system).
1 parent 1b2ea86 commit 07e14b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/com/ladsers/passtable/android/activities/TableActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,8 @@ class TableActivity : AppCompatActivity() {
187187
}
188188

189189
fun badResult(isNeedUpdate: Boolean = false) {
190-
RecentFiles.remove(this, mainUri)
191-
192190
if (isNeedUpdate) {
191+
RecentFiles.remove(this, mainUri)
193192
ErrorDlg.showCritical(messageDlg, this, getString(R.string.dlg_err_needAppUpdate))
194193
} else {
195194
//getBooleanExtra for loop protection
@@ -199,6 +198,7 @@ class TableActivity : AppCompatActivity() {
199198
foundBackup?.let {
200199
ErrorDlg.showRestoreBackup(messageDlg, this, it, mainUri)
201200
} ?: let {
201+
RecentFiles.remove(this, mainUri)
202202
ErrorDlg.showCritical(messageDlg, this, getString(R.string.dlg_err_fileDamaged))
203203
}
204204
}

0 commit comments

Comments
 (0)