summarylogtreecommitdiffstats
path: root/clicky_sticker_panel.patch
blob: 52258a95454c2e1d9547538de3b11f263b14a4fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Description: open the sticker panel by clicking rather than hovering, disable persistent column
Credits: JuanPotato, novie

diff --git a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp
index 189c8ec18..d7c7f982a 100644
--- a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp
+++ b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp
@@ -232,10 +232,12 @@ void TabbedPanel::leaveEventHook(QEvent *e) {
 }
 
 void TabbedPanel::otherEnter() {
+	return;
 	showAnimated();
 }
 
 void TabbedPanel::otherLeave() {
+	return;
 	if (preventAutoHide()) {
 		return;
 	}
diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp
index 91833a8f4..9ce28008a 100644
--- a/Telegram/SourceFiles/history/history_widget.cpp
+++ b/Telegram/SourceFiles/history/history_widget.cpp
@@ -4029,6 +4029,7 @@ void HistoryWidget::showMembersDropdown() {
 bool HistoryWidget::pushTabbedSelectorToThirdSection(
 		not_null<PeerData*> peer,
 		const Window::SectionShow &params) {
+	return true;
 	if (!_tabbedPanel) {
 		return true;
 	} else if (!peer->canWrite()) {
@@ -4082,20 +4083,7 @@ void HistoryWidget::toggleTabbedSelectorMode() {
 	if (!_peer) {
 		return;
 	}
-	if (_tabbedPanel) {
-		if (controller()->canShowThirdSection()
-			&& !controller()->adaptive().isOneColumn()) {
-			Core::App().settings().setTabbedSelectorSectionEnabled(true);
-			Core::App().saveSettingsDelayed();
-			pushTabbedSelectorToThirdSection(
-				_peer,
-				Window::SectionShow::Way::ClearStack);
-		} else {
-			_tabbedPanel->toggleAnimated();
-		}
-	} else {
-		controller()->closeThirdSection();
-	}
+	_tabbedPanel->toggleAnimated();
 }
 
 void HistoryWidget::recountChatWidth() {
diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp
index 01809184b..b7581bb8e 100644
--- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp
+++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp
@@ -1869,6 +1869,7 @@ void ComposeControls::escape() {
 bool ComposeControls::pushTabbedSelectorToThirdSection(
 		not_null<PeerData*> peer,
 		const Window::SectionShow &params) {
+	return true;
 	if (!_tabbedPanel) {
 		return true;
 	//} else if (!_canSendMessages) {
@@ -1919,20 +1920,7 @@ void ComposeControls::toggleTabbedSelectorMode() {
 	if (!_history) {
 		return;
 	}
-	if (_tabbedPanel) {
-		if (_window->canShowThirdSection()
-				&& !_window->adaptive().isOneColumn()) {
-			Core::App().settings().setTabbedSelectorSectionEnabled(true);
-			Core::App().saveSettingsDelayed();
-			pushTabbedSelectorToThirdSection(
-				_history->peer,
-				Window::SectionShow::Way::ClearStack);
-		} else {
-			_tabbedPanel->toggleAnimated();
-		}
-	} else {
-		_window->closeThirdSection();
-	}
+	_tabbedPanel->toggleAnimated();
 }
 
 void ComposeControls::updateHeight() {