mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Added a neutral button to save the setting without starting the download
This commit is contained in:
parent
a0122bb95c
commit
839b3ec26d
2 changed files with 9 additions and 1 deletions
|
|
@ -38,6 +38,7 @@ public class StarredSyncDialog extends DialogFragment {
|
|||
builder.setView(bind.getRoot())
|
||||
.setTitle(R.string.starred_sync_dialog_title)
|
||||
.setPositiveButton(R.string.starred_sync_dialog_positive_button, null)
|
||||
.setNeutralButton(R.string.starred_sync_dialog_neutral_button, null)
|
||||
.setNegativeButton(R.string.starred_sync_dialog_negative_button, null);
|
||||
|
||||
return builder.create();
|
||||
|
|
@ -73,6 +74,12 @@ public class StarredSyncDialog extends DialogFragment {
|
|||
});
|
||||
});
|
||||
|
||||
Button neutralButton = dialog.getButton(Dialog.BUTTON_NEUTRAL);
|
||||
neutralButton.setOnClickListener(v -> {
|
||||
Preferences.setStarredSyncEnabled(true);
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
||||
Button negativeButton = dialog.getButton(Dialog.BUTTON_NEGATIVE);
|
||||
negativeButton.setOnClickListener(v -> {
|
||||
Preferences.setStarredSyncEnabled(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue