diff --git a/Telegram/Resources/icons/menu/hide.png b/Telegram/Resources/icons/menu/hide.png new file mode 100644 index 000000000..1cdc079be Binary files /dev/null and b/Telegram/Resources/icons/menu/hide.png differ diff --git a/Telegram/Resources/icons/menu/hide@2x.png b/Telegram/Resources/icons/menu/hide@2x.png new file mode 100644 index 000000000..c5dc78095 Binary files /dev/null and b/Telegram/Resources/icons/menu/hide@2x.png differ diff --git a/Telegram/Resources/icons/menu/hide@3x.png b/Telegram/Resources/icons/menu/hide@3x.png new file mode 100644 index 000000000..e32ae8b29 Binary files /dev/null and b/Telegram/Resources/icons/menu/hide@3x.png differ diff --git a/Telegram/Resources/langs/rewrites/en.json b/Telegram/Resources/langs/rewrites/en.json index d6bb3ee74..c26b5dfbb 100644 --- a/Telegram/Resources/langs/rewrites/en.json +++ b/Telegram/Resources/langs/rewrites/en.json @@ -62,8 +62,13 @@ "other": "Recent stickers: show {count} stickers" }, "ktg_settings_recent_stickers_limit_none": "Recent stickers: hide all", + "ktg_filters_context_edit_all": "Edit folders", "ktg_settings_filters": "Folders", + "ktg_settings_filters_only_unmuted_counter": "Do not count muted chats", + "ktg_settings_filters_hide_edit": "Hide Edit button", + "ktg_settings_filters_hide_folder_names": "Compact folders", "ktg_settings_messages": "Messages", + "ktg_settings_filters_hide_all": "Hide \"All chats\" folder", "ktg_settings_tray_icon": "Tray icon", "ktg_settings_tray_icon_default": "Default", "ktg_settings_tray_icon_blue": "Blue", @@ -86,6 +91,10 @@ "ktg_supergroup_id_copied": "Supergroup ID copied to clipboard.", "ktg_channel_id_copied": "Channel ID copied to clipboard.", "ktg_settings_forward": "Forward", + "ktg_filters_hide_folder": "Hide folder", + "ktg_filters_hide_button": "Hide button", + "ktg_filters_hide_all_chats_toast": "\"All Chats\" folder is hidden.\nYou can enable it back in Kotatogram Settings.", + "ktg_filters_hide_edit_toast": "Edit button is hidden.\nYou can enable it back in Kotatogram Settings.", "ktg_in_app_update_disabled": "In-app updater is disabled.", "dummy_last_string": "" } diff --git a/Telegram/SourceFiles/kotato/kotato_settings.cpp b/Telegram/SourceFiles/kotato/kotato_settings.cpp index fed7f6997..5658540bf 100644 --- a/Telegram/SourceFiles/kotato/kotato_settings.cpp +++ b/Telegram/SourceFiles/kotato/kotato_settings.cpp @@ -306,6 +306,18 @@ const std::map> DefinitionMap { .type = SettingType::IntSetting, .defaultValue = 0, .limitHandler = IntLimit(0, 5), }}, + { "folders/count_unmuted_only", { + .type = SettingType::BoolSetting, + .defaultValue = false, }}, + { "folders/hide_edit_button", { + .type = SettingType::BoolSetting, + .defaultValue = false, }}, + { "folders/hide_names", { + .type = SettingType::BoolSetting, + .defaultValue = false, }}, + { "folders/hide_all_chats", { + .type = SettingType::BoolSetting, + .defaultValue = false, }}, }; using OldOptionKey = QString; diff --git a/Telegram/SourceFiles/kotato/kotato_settings_menu.cpp b/Telegram/SourceFiles/kotato/kotato_settings_menu.cpp index e2cf0bfa0..a8c8245f3 100644 --- a/Telegram/SourceFiles/kotato/kotato_settings_menu.cpp +++ b/Telegram/SourceFiles/kotato/kotato_settings_menu.cpp @@ -107,6 +107,21 @@ QString ChatIdLabel(int option) { ::Kotato::JsonSettings::Write(); \ }, container->lifetime()); +#define SettingsMenuJsonFilterSwitch(LangKey, Option) container->add(object_ptr