mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-22 21:58:53 +01:00
Added confirmation for delete old messages feature
This commit is contained in:
@@ -459,9 +459,20 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DELETE_OLD_MESSAGES:
|
case DELETE_OLD_MESSAGES:
|
||||||
DeleteOldMessagesService.setupAutoDeleteAlarm(mContext);
|
|
||||||
if ((Boolean) newValue) {
|
if ((Boolean) newValue) {
|
||||||
mContext.makeToast(R.string.toast_deleting_old_messages);
|
new QKDialog()
|
||||||
|
.setContext(mContext)
|
||||||
|
.setTitle(R.string.pref_delete_old_messages)
|
||||||
|
.setMessage(R.string.dialog_delete_old_messages)
|
||||||
|
.setPositiveButton(R.string.yes, v -> {
|
||||||
|
QKPreferences.setBoolean(QKPreference.AUTO_DELETE, true);
|
||||||
|
((CheckBoxPreference) preference).setChecked(true);
|
||||||
|
DeleteOldMessagesService.setupAutoDeleteAlarm(mContext);
|
||||||
|
mContext.makeToast(R.string.toast_deleting_old_messages);
|
||||||
|
})
|
||||||
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
.show();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -597,6 +597,7 @@
|
|||||||
<string name="dialog_conversation_details_recipients">Recipients (%s)</string>
|
<string name="dialog_conversation_details_recipients">Recipients (%s)</string>
|
||||||
<string name="dialog_should_i_answer_title">Should I Answer? not installed</string>
|
<string name="dialog_should_i_answer_title">Should I Answer? not installed</string>
|
||||||
<string name="dialog_should_i_answer_message">Would you like to download the app from Google Play now?</string>
|
<string name="dialog_should_i_answer_message">Would you like to download the app from Google Play now?</string>
|
||||||
|
<string name="dialog_delete_old_messages">Are you sure you want to automatically delete old messages?</string>
|
||||||
|
|
||||||
<!-- Title for audio file picker -->
|
<!-- Title for audio file picker -->
|
||||||
<string name="select_audio">Choose audio</string>
|
<string name="select_audio">Choose audio</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user