mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Add "Translate Entire Chat" button to Settings.
This commit is contained in:
@@ -251,6 +251,7 @@ void Cover::refreshUsernameGeometry(int newWidth) {
|
||||
} // namespace
|
||||
|
||||
void SetupLanguageButton(
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
bool icon) {
|
||||
const auto button = AddButtonWithLabel(
|
||||
@@ -269,7 +270,7 @@ void SetupLanguageButton(
|
||||
if ((m & Qt::ShiftModifier) && (m & Qt::AltModifier)) {
|
||||
Lang::CurrentCloudManager().switchToLanguage({ u"#custom"_q });
|
||||
} else {
|
||||
*guard = LanguageBox::Show();
|
||||
*guard = LanguageBox::Show(window->sessionController());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -373,7 +374,7 @@ void SetupSections(
|
||||
Calls::Id(),
|
||||
{ &st::settingsIconCalls, kIconGreen });
|
||||
|
||||
SetupLanguageButton(container);
|
||||
SetupLanguageButton(&controller->window(), container);
|
||||
|
||||
if (controller->session().premiumPossible()) {
|
||||
AddSkip(container);
|
||||
|
Reference in New Issue
Block a user