Skip to content

Commit

Permalink
Show unfocused auto-scroll option only if IsOverlapped works (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored Dec 31, 2021
1 parent 6f5f594 commit 3c5bec9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Telegram/SourceFiles/kotato/settings_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ For license and copyright information please follow this link:
#include "facades.h"
#include "app.h"
#include "styles/style_settings.h"
#include "ui/platform/ui_platform_utility.h"

namespace Settings {

Expand Down Expand Up @@ -275,7 +276,10 @@ void SetupKotatoChats(

SettingsMenuCSwitch(ktg_settings_top_bar_mute, ProfileTopBarNotifications);
SettingsMenuCSwitch(ktg_settings_disable_up_edit, DisableUpEdit);
SettingsMenuCSwitch(ktg_settings_auto_scroll_unfocused, AutoScrollUnfocused);

if (Ui::Platform::IsOverlapped(controller, QRect()).has_value()) {
SettingsMenuCSwitch(ktg_settings_auto_scroll_unfocused, AutoScrollUnfocused);
}

AddButton(
container,
Expand Down

0 comments on commit 3c5bec9

Please sign in to comment.