Remove "confirmDeleteFromNotification" methods from 'K9'
This commit is contained in:
parent
c0fcb634e8
commit
9f6d717af0
4 changed files with 10 additions and 18 deletions
|
@ -196,7 +196,9 @@ object K9 : KoinComponent {
|
|||
@JvmStatic
|
||||
var isConfirmSpam = false
|
||||
|
||||
private var confirmDeleteFromNotification = true
|
||||
@JvmStatic
|
||||
var isConfirmDeleteFromNotification = true
|
||||
|
||||
private var confirmMarkAllRead = true
|
||||
|
||||
@JvmStatic
|
||||
|
@ -341,16 +343,6 @@ object K9 : KoinComponent {
|
|||
updateLoggingStatus()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun confirmDeleteFromNotification(): Boolean {
|
||||
return confirmDeleteFromNotification
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setConfirmDeleteFromNotification(confirm: Boolean) {
|
||||
confirmDeleteFromNotification = confirm
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun confirmMarkAllRead(): Boolean {
|
||||
return confirmMarkAllRead
|
||||
|
@ -484,7 +476,7 @@ object K9 : KoinComponent {
|
|||
isConfirmDiscardMessage = storage.getBoolean("confirmDiscardMessage", true)
|
||||
isConfirmDeleteStarred = storage.getBoolean("confirmDeleteStarred", false)
|
||||
isConfirmSpam = storage.getBoolean("confirmSpam", false)
|
||||
confirmDeleteFromNotification = storage.getBoolean("confirmDeleteFromNotification", true)
|
||||
isConfirmDeleteFromNotification = storage.getBoolean("confirmDeleteFromNotification", true)
|
||||
confirmMarkAllRead = storage.getBoolean("confirmMarkAllRead", true)
|
||||
|
||||
sortType = try {
|
||||
|
@ -610,7 +602,7 @@ object K9 : KoinComponent {
|
|||
editor.putBoolean("confirmDiscardMessage", isConfirmDiscardMessage)
|
||||
editor.putBoolean("confirmDeleteStarred", isConfirmDeleteStarred)
|
||||
editor.putBoolean("confirmSpam", isConfirmSpam)
|
||||
editor.putBoolean("confirmDeleteFromNotification", confirmDeleteFromNotification)
|
||||
editor.putBoolean("confirmDeleteFromNotification", isConfirmDeleteFromNotification)
|
||||
editor.putBoolean("confirmMarkAllRead", confirmMarkAllRead)
|
||||
|
||||
editor.putString("sortTypeEnum", sortType.name)
|
||||
|
|
|
@ -227,7 +227,7 @@ class WearNotifications extends BaseNotifications {
|
|||
}
|
||||
|
||||
private boolean isDeleteActionAvailableForWear() {
|
||||
return isDeleteActionEnabled() && !K9.confirmDeleteFromNotification();
|
||||
return isDeleteActionEnabled() && !K9.isConfirmDeleteFromNotification();
|
||||
}
|
||||
|
||||
private boolean isArchiveActionAvailableForWear(Account account) {
|
||||
|
|
|
@ -140,7 +140,7 @@ class K9NotificationActionCreator implements NotificationActionCreator {
|
|||
|
||||
@Override
|
||||
public PendingIntent createDeleteMessagePendingIntent(MessageReference messageReference, int notificationId) {
|
||||
if (K9.confirmDeleteFromNotification()) {
|
||||
if (K9.isConfirmDeleteFromNotification()) {
|
||||
return createDeleteConfirmationPendingIntent(messageReference, notificationId);
|
||||
} else {
|
||||
return createDeleteServicePendingIntent(messageReference, notificationId);
|
||||
|
@ -162,7 +162,7 @@ class K9NotificationActionCreator implements NotificationActionCreator {
|
|||
@Override
|
||||
public PendingIntent createDeleteAllPendingIntent(Account account, List<MessageReference> messageReferences,
|
||||
int notificationId) {
|
||||
if (K9.confirmDeleteFromNotification()) {
|
||||
if (K9.isConfirmDeleteFromNotification()) {
|
||||
return getDeleteAllConfirmationPendingIntent(messageReferences, notificationId);
|
||||
} else {
|
||||
return getDeleteAllServicePendingIntent(account, messageReferences, notificationId);
|
||||
|
|
|
@ -153,7 +153,7 @@ class GeneralSettingsDataStore(
|
|||
mutableSetOf<String>().apply {
|
||||
if (K9.isConfirmDelete) add("delete")
|
||||
if (K9.isConfirmDeleteStarred) add("delete_starred")
|
||||
if (K9.confirmDeleteFromNotification()) add("delete_notif")
|
||||
if (K9.isConfirmDeleteFromNotification) add("delete_notif")
|
||||
if (K9.isConfirmSpam) add("spam")
|
||||
if (K9.isConfirmDiscardMessage) add("discard")
|
||||
if (K9.confirmMarkAllRead()) add("mark_all_read")
|
||||
|
@ -184,7 +184,7 @@ class GeneralSettingsDataStore(
|
|||
"confirm_actions" -> {
|
||||
K9.isConfirmDelete = "delete" in checkedValues
|
||||
K9.isConfirmDeleteStarred = "delete_starred" in checkedValues
|
||||
K9.setConfirmDeleteFromNotification("delete_notif" in checkedValues)
|
||||
K9.isConfirmDeleteFromNotification = "delete_notif" in checkedValues
|
||||
K9.isConfirmSpam = "spam" in checkedValues
|
||||
K9.isConfirmDiscardMessage = "discard" in checkedValues
|
||||
K9.setConfirmMarkAllRead("mark_all_read" in checkedValues)
|
||||
|
|
Loading…
Reference in a new issue