add delete option for suspect-corrupt files

This commit is contained in:
Eric House 2020-04-18 14:35:36 -07:00
parent 8c50bb1895
commit 5fce6d8e26
3 changed files with 14 additions and 6 deletions

View file

@ -53,7 +53,8 @@ public class DlgDelegate {
SEND_EMAIL,
WRITE_LOG_DB,
CLEAR_LOG_DB,
CLEAR_QUARANTINE,
QUARANTINE_CLEAR,
QUARANTINE_DELETE,
// BoardDelegate
UNDO_LAST_ACTION,

View file

@ -1237,8 +1237,10 @@ public class GamesListDelegate extends ListDelegateBase
.show();
} else {
makeConfirmThenBuilder( R.string.unsafe_open_warning,
Action.CLEAR_QUARANTINE )
Action.QUARANTINE_CLEAR )
.setPosButton( R.string.unsafe_open_disregard )
.setActionPair( Action.QUARANTINE_DELETE,
R.string.button_delete )
.setParams( rowid, summary )
.show();
}
@ -1357,13 +1359,18 @@ public class GamesListDelegate extends ListDelegateBase
case OPEN_GAME:
doOpenGame( params );
break;
case CLEAR_QUARANTINE:
case QUARANTINE_CLEAR:
long rowid = (long)params[0];
Quarantine.clear( rowid );
GameSummary summary = (GameSummary)params[0];
GameSummary summary = (GameSummary)params[1];
openWithChecks( rowid, summary );
break;
case QUARANTINE_DELETE:
rowid = (long)params[0];
deleteGames( new long[] {rowid}, true );
break;
case CLEAR_SELS:
clearSelections();
break;

View file

@ -2521,8 +2521,8 @@
<string name="history_autopause">Auto-paused.</string>
<string name="unsafe_open_warning">This game has caused CrossWords
to crash recently and is likely corrupt. Do you want to open it
anyway?</string>
to crash recently and is likely damaged. Opening it might cause
another crash. Do you want to open it anyway?</string>
<string name="unsafe_open_disregard">Open anyway</string>
<string name="gamel_menu_logs">Debug logs</string>