mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Merge remote-tracking branch 'tdesktop/dev' into dev
This commit is contained in:
@@ -139,7 +139,7 @@ QIcon CreateOfficialIcon(Main::Account *account) {
|
||||
QIcon CreateIcon(Main::Account *account) {
|
||||
auto result = CreateOfficialIcon(account);
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
if (
|
||||
(!account
|
||||
|| !account->sessionExists()
|
||||
@@ -635,7 +635,7 @@ bool MainWindow::minimizeToTray() {
|
||||
}
|
||||
|
||||
void MainWindow::reActivateWindow() {
|
||||
#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
const auto reActivate = [=] {
|
||||
if (const auto w = App::wnd()) {
|
||||
if (auto f = QApplication::focusWidget()) {
|
||||
@@ -650,7 +650,7 @@ void MainWindow::reActivateWindow() {
|
||||
};
|
||||
crl::on_main(this, reActivate);
|
||||
base::call_delayed(200, this, reActivate);
|
||||
#endif // Q_OS_LINUX32 || Q_OS_LINUX64
|
||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
||||
}
|
||||
|
||||
void MainWindow::showRightColumn(object_ptr<TWidget> widget) {
|
||||
|
@@ -185,13 +185,15 @@ void PasscodeLockWidget::setInnerFocus() {
|
||||
_passcode->setFocusFast();
|
||||
}
|
||||
|
||||
TermsLock TermsLock::FromMTP(const MTPDhelp_termsOfService &data) {
|
||||
TermsLock TermsLock::FromMTP(
|
||||
Main::Session *session,
|
||||
const MTPDhelp_termsOfService &data) {
|
||||
const auto minAge = data.vmin_age_confirm();
|
||||
return {
|
||||
bytes::make_vector(data.vid().c_dataJSON().vdata().v),
|
||||
TextWithEntities {
|
||||
TextUtilities::Clean(qs(data.vtext())),
|
||||
Api::EntitiesFromMTP(data.ventities().v) },
|
||||
Api::EntitiesFromMTP(session, data.ventities().v) },
|
||||
(minAge ? std::make_optional(minAge->v) : std::nullopt),
|
||||
data.is_popup()
|
||||
};
|
||||
|
@@ -19,6 +19,10 @@ class RoundButton;
|
||||
class CheckView;
|
||||
} // namespace Ui
|
||||
|
||||
namespace Main {
|
||||
class Session;
|
||||
} // namespace Main
|
||||
|
||||
namespace Window {
|
||||
|
||||
class Controller;
|
||||
@@ -83,7 +87,9 @@ struct TermsLock {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
static TermsLock FromMTP(const MTPDhelp_termsOfService &data);
|
||||
static TermsLock FromMTP(
|
||||
Main::Session *session,
|
||||
const MTPDhelp_termsOfService &data);
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user