|
|
@ -20,6 +20,7 @@ import Button from "../../button"; |
|
|
|
import AppIncludedChatsTab from "./includedChats"; |
|
|
|
import AppIncludedChatsTab from "./includedChats"; |
|
|
|
import { i18n, i18n_, LangPackKey } from "../../../lib/langPack"; |
|
|
|
import { i18n, i18n_, LangPackKey } from "../../../lib/langPack"; |
|
|
|
import { SettingSection } from ".."; |
|
|
|
import { SettingSection } from ".."; |
|
|
|
|
|
|
|
import PopupPeer from "../../popups/peer"; |
|
|
|
|
|
|
|
|
|
|
|
const MAX_FOLDER_NAME_LENGTH = 12; |
|
|
|
const MAX_FOLDER_NAME_LENGTH = 12; |
|
|
|
|
|
|
|
|
|
|
@ -55,6 +56,12 @@ export default class AppEditFolderTab extends SliderSuperTab { |
|
|
|
icon: 'delete danger', |
|
|
|
icon: 'delete danger', |
|
|
|
text: 'FilterMenuDelete', |
|
|
|
text: 'FilterMenuDelete', |
|
|
|
onClick: () => { |
|
|
|
onClick: () => { |
|
|
|
|
|
|
|
new PopupPeer('filter-delete', { |
|
|
|
|
|
|
|
titleLangKey: 'ChatList.Filter.Confirm.Remove.Header', |
|
|
|
|
|
|
|
descriptionLangKey: 'ChatList.Filter.Confirm.Remove.Text', |
|
|
|
|
|
|
|
buttons: [{ |
|
|
|
|
|
|
|
langKey: 'Delete', |
|
|
|
|
|
|
|
callback: () => { |
|
|
|
deleteFolderButton.element.setAttribute('disabled', 'true'); |
|
|
|
deleteFolderButton.element.setAttribute('disabled', 'true'); |
|
|
|
appMessagesManager.filtersStorage.updateDialogFilter(this.filter, true).then(bool => { |
|
|
|
appMessagesManager.filtersStorage.updateDialogFilter(this.filter, true).then(bool => { |
|
|
|
if(bool) { |
|
|
|
if(bool) { |
|
|
@ -63,6 +70,10 @@ export default class AppEditFolderTab extends SliderSuperTab { |
|
|
|
}).finally(() => { |
|
|
|
}).finally(() => { |
|
|
|
deleteFolderButton.element.removeAttribute('disabled'); |
|
|
|
deleteFolderButton.element.removeAttribute('disabled'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
isDanger: true |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}).show(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.menuBtn = ButtonMenuToggle({}, 'bottom-left', [deleteFolderButton]); |
|
|
|
this.menuBtn = ButtonMenuToggle({}, 'bottom-left', [deleteFolderButton]); |
|
|
|