Fix missing clear histoty options. close #404

This commit is contained in:
世界 2021-03-09 23:21:56 +08:00
parent 629593bf19
commit d367b863f1
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
1 changed files with 4 additions and 3 deletions

View File

@ -2442,9 +2442,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if (currentEncryptedChat != null) {
timeItem2 = headerItem.addSubItem(chat_enc_timer, R.drawable.baseline_timer_24, LocaleController.getString("SetTimer", R.string.SetTimer));
}
if (currentEncryptedChat == null && (currentChat == null || ChatObject.canUserDoAdminAction(currentChat, ChatObject.ACTION_DELETE_MESSAGES))) {
headerItem.addSubItem(auto_delete_timer, R.drawable.baseline_timer_24, LocaleController.getString("AutoDeleteSetTimer", R.string.AutoDeleteSetTimer));
} else {
if (currentEncryptedChat == null) {
if (currentChat == null || ChatObject.canUserDoAdminAction(currentChat, ChatObject.ACTION_DELETE_MESSAGES)) {
headerItem.addSubItem(auto_delete_timer, R.drawable.baseline_timer_24, LocaleController.getString("AutoDeleteSetTimer", R.string.AutoDeleteSetTimer));
}
headerItem.addSubItem(clear_history, R.drawable.baseline_delete_sweep_24, LocaleController.getString("ClearHistory", R.string.ClearHistory));
}
if (currentUser == null || !currentUser.self) {