mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Add hide-chats-list-in-forums setting.
This commit is contained in:
parent
98ab91a56a
commit
b17b806d91
3 changed files with 15 additions and 1 deletions
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "dialogs/dialogs_widget.h"
|
||||
|
||||
#include "base/options.h"
|
||||
#include "dialogs/ui/dialogs_stories_content.h"
|
||||
#include "dialogs/ui/dialogs_stories_list.h"
|
||||
#include "dialogs/dialogs_inner_widget.h"
|
||||
|
@ -86,8 +87,16 @@ namespace {
|
|||
constexpr auto kSearchPerPage = 50;
|
||||
constexpr auto kStoriesExpandDuration = crl::time(200);
|
||||
|
||||
base::options::toggle OptionForumHideChatsList({
|
||||
.id = kOptionForumHideChatsList,
|
||||
.name = "Hide chats list in forums",
|
||||
.description = "Don't keep a narrow column of chats list.",
|
||||
});
|
||||
|
||||
} // namespace
|
||||
|
||||
const char kOptionForumHideChatsList[] = "forum-hide-chats-list";
|
||||
|
||||
class Widget::BottomButton : public Ui::RippleButton {
|
||||
public:
|
||||
BottomButton(
|
||||
|
@ -2401,7 +2410,8 @@ void Widget::showForum(
|
|||
const Window::SectionShow ¶ms) {
|
||||
if (!params.childColumn
|
||||
|| !Core::App().settings().dialogsWidthRatio()
|
||||
|| (_layout != Layout::Main)) {
|
||||
|| (_layout != Layout::Main)
|
||||
|| OptionForumHideChatsList.value()) {
|
||||
changeOpenedForum(forum, params.animated);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -65,6 +65,8 @@ struct Content;
|
|||
|
||||
namespace Dialogs {
|
||||
|
||||
extern const char kOptionForumHideChatsList[];
|
||||
|
||||
struct RowDescriptor;
|
||||
class Row;
|
||||
class FakeRow;
|
||||
|
|
|
@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "core/application.h"
|
||||
#include "core/launcher.h"
|
||||
#include "chat_helpers/tabbed_panel.h"
|
||||
#include "dialogs/dialogs_widget.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "mainwindow.h"
|
||||
#include "media/player/media_player_instance.h"
|
||||
|
@ -137,6 +138,7 @@ void SetupExperimental(
|
|||
};
|
||||
|
||||
addToggle(ChatHelpers::kOptionTabbedPanelShowOnClick);
|
||||
addToggle(Dialogs::kOptionForumHideChatsList);
|
||||
addToggle(Core::kOptionFractionalScalingEnabled);
|
||||
addToggle(Window::kOptionViewProfileInChatsListContextMenu);
|
||||
addToggle(Ui::GL::kOptionAllowLinuxNvidiaOpenGL);
|
||||
|
|
Loading…
Add table
Reference in a new issue