diff options
author | Stefan Niedermann <info@niedermann.it> | 2021-06-23 11:09:57 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2021-06-23 11:09:57 +0300 |
commit | eae70001d1fbc079b6edd317a2813703c27d8708 (patch) | |
tree | 3335dc7eb39325de1696d322466c3c83a07437a3 /app/src/main/java/it/niedermann | |
parent | 110d84133698ad4382348a108c26bb6e419e4039 (diff) |
Fix #1276 Checkboxes using an uppercase X can not be toggled
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann')
-rw-r--r-- | app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java index 3d9e2ff0..23e2ea42 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java @@ -184,33 +184,22 @@ public class MainActivity extends LockedActivity implements NoteClickListener, A // Verbose log output for https://github.com/stefan-niedermann/nextcloud-notes/issues/1256 runOnUiThread(() -> new AlertDialog.Builder(this) .setTitle(NextcloudFilesAppAccountNotFoundException.class.getSimpleName()) - .setMessage(R.string.backup_and_repair) - .setPositiveButton(R.string.simple_repair, (a, b) -> { - executor.submit(() -> { - for (Account account : mainViewModel.getAccounts()) { - SingleAccountHelper.setCurrentAccount(this, account.getAccountName()); - runOnUiThread(this::recreate); - break; - } - }); - }) - .setNegativeButton(R.string.simple_backup, (a, b) -> { - executor.submit(() -> { - final List<Note> modifiedNotes = new LinkedList<>(); - for (Account account : mainViewModel.getAccounts()) { - modifiedNotes.addAll(mainViewModel.getLocalModifiedNotes(account.getId())); - } - if (modifiedNotes.size() == 1) { - final Note note = modifiedNotes.get(0); - ShareUtil.openShareDialog(this, note.getTitle(), note.getContent()); - } else { - ShareUtil.openShareDialog(this, - getResources().getQuantityString(R.plurals.share_multiple, modifiedNotes.size(), modifiedNotes.size()), - mainViewModel.collectNoteContents(modifiedNotes.stream().map(Note::getId).collect(Collectors.toList()))); - } - }); - }) - .setNeutralButton(android.R.string.cancel, (a, b) -> { + .setMessage(R.string.backup) + .setPositiveButton(R.string.simple_backup, (a, b) -> executor.submit(() -> { + final List<Note> modifiedNotes = new LinkedList<>(); + for (Account account : mainViewModel.getAccounts()) { + modifiedNotes.addAll(mainViewModel.getLocalModifiedNotes(account.getId())); + } + if (modifiedNotes.size() == 1) { + final Note note = modifiedNotes.get(0); + ShareUtil.openShareDialog(this, note.getTitle(), note.getContent()); + } else { + ShareUtil.openShareDialog(this, + getResources().getQuantityString(R.plurals.share_multiple, modifiedNotes.size(), modifiedNotes.size()), + mainViewModel.collectNoteContents(modifiedNotes.stream().map(Note::getId).collect(Collectors.toList()))); + } + })) + .setNegativeButton(R.string.simple_error, (a, b) -> { final SharedPreferences ssoPreferences = AccountImporter.getSharedPreferences(getApplicationContext()); final StringBuilder ssoPreferencesString = new StringBuilder() .append("Current SSO account: ").append(ssoPreferences.getString("PREF_CURRENT_ACCOUNT_STRING", null)).append("\n") |