1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-14 11:59:52 +01:00

Fix delete for all checkes

(cherry picked from commit 48d1195bf66c6a94cc33fb1771bdab327ed7dfb0)
This commit is contained in:
tehcneko 2021-03-24 18:28:01 +08:00 committed by 世界
parent a9a93732c3
commit df00b507b3
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -1278,7 +1278,7 @@ public class AlertsCreator {
revokeTimeLimit = MessagesController.getInstance(account).revokeTimeLimit;
}
boolean canDeleteInbox = !secret && user != null && canRevokeInbox && revokeTimeLimit == 0x7fffffff;
final boolean[] deleteForAll = {true};
final boolean[] deleteForAll = new boolean[1];
boolean deleteChatForAll = false;
if (!second && (secret && !clear || canDeleteInbox) && !UserObject.isDeleted(user) || (deleteChatForAll = checkDeleteForAll && !clear && chat != null && chat.creator)) {
@ -1291,8 +1291,10 @@ public class AlertsCreator {
cell[0].setText(LocaleController.getString("DeleteGroupForAll", R.string.DeleteGroupForAll), "", deleteForAll[0], false);
}
} else if (clear) {
deleteForAll[0] = true;
cell[0].setText(LocaleController.formatString("ClearHistoryOptionAlso", R.string.ClearHistoryOptionAlso, UserObject.getFirstName(user)), "", deleteForAll[0], false);
} else {
deleteForAll[0] = true;
cell[0].setText(LocaleController.formatString("DeleteMessagesOptionAlso", R.string.DeleteMessagesOptionAlso, UserObject.getFirstName(user)), "", deleteForAll[0], false);
}
cell[0].setPadding(LocaleController.isRTL ? AndroidUtilities.dp(16) : AndroidUtilities.dp(8), 0, LocaleController.isRTL ? AndroidUtilities.dp(8) : AndroidUtilities.dp(16), 0);