mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Send viewport updates in web-apps.
This commit is contained in:
parent
97d93b23dc
commit
674bab69f5
1 changed files with 12 additions and 0 deletions
|
@ -1050,6 +1050,18 @@ void Panel::processMainButtonMessage(const QJsonObject &args) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto shown = [&] {
|
||||||
|
return _mainButton && !_mainButton->isHidden();
|
||||||
|
};
|
||||||
|
const auto wasShown = shown();
|
||||||
|
const auto guard = gsl::finally([&] {
|
||||||
|
if (shown() != wasShown) {
|
||||||
|
crl::on_main(this, [=] {
|
||||||
|
sendViewport();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!_mainButton) {
|
if (!_mainButton) {
|
||||||
if (args["is_visible"].toBool()) {
|
if (args["is_visible"].toBool()) {
|
||||||
createMainButton();
|
createMainButton();
|
||||||
|
|
Loading…
Add table
Reference in a new issue