mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Added ability to move archive in main menu.
- Added Folder::paintUserpic overload for custom color. - Reduced size of _cloudButton.
This commit is contained in:
@@ -84,7 +84,7 @@ public:
|
||||
void fill();
|
||||
|
||||
private:
|
||||
void addToggleCollapse();
|
||||
void addTogglesForArchive();
|
||||
//bool showInfo();
|
||||
//void addTogglePin();
|
||||
//void addInfo();
|
||||
@@ -544,11 +544,11 @@ FolderFiller::FolderFiller(
|
||||
|
||||
void FolderFiller::fill() {
|
||||
if (_source == PeerMenuSource::ChatsList) {
|
||||
addToggleCollapse();
|
||||
addTogglesForArchive();
|
||||
}
|
||||
}
|
||||
|
||||
void FolderFiller::addToggleCollapse() {
|
||||
void FolderFiller::addTogglesForArchive() {
|
||||
if (_folder->id() != Data::Folder::kId) {
|
||||
return;
|
||||
}
|
||||
@@ -561,6 +561,18 @@ void FolderFiller::addToggleCollapse() {
|
||||
controller->session().settings().setArchiveCollapsed(!hidden);
|
||||
controller->session().saveSettingsDelayed();
|
||||
});
|
||||
|
||||
_addAction(lang(lng_context_archive_to_menu), [=] {
|
||||
Ui::Toast::Config toast;
|
||||
toast.text = lang(lng_context_archive_to_menu_info);
|
||||
toast.maxWidth = st::boxWideWidth;
|
||||
toast.durationMs = kArchivedToastDuration;
|
||||
Ui::Toast::Show(toast);
|
||||
|
||||
controller->session().settings().setArchiveInMainMenu(
|
||||
!controller->session().settings().archiveInMainMenu());
|
||||
controller->session().saveSettingsDelayed();
|
||||
});
|
||||
}
|
||||
//
|
||||
//void FolderFiller::addInfo() {
|
||||
|
Reference in New Issue
Block a user