mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Don't use crl::on_main unnecessarily with XDP::SettingWatcher
g_dbus_connection_signal_subscribe calls the callback on the same thread
This commit is contained in:
parent
119f7e757d
commit
4807244682
1 changed files with 7 additions and 8 deletions
|
@ -216,14 +216,13 @@ LinuxIntegration::LinuxIntegration()
|
|||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
QWindowSystemInterface::handleThemeChange();
|
||||
#else // Qt >= 6.5.0
|
||||
try {
|
||||
const auto ivalue = value.get_dynamic<uint>();
|
||||
|
||||
crl::on_main([=] {
|
||||
Core::App().settings().setSystemDarkMode(ivalue == 1);
|
||||
});
|
||||
} catch (...) {
|
||||
}
|
||||
Core::Sandbox::Instance().customEnterFromEventLoop([&] {
|
||||
try {
|
||||
Core::App().settings().setSystemDarkMode(
|
||||
value.get_dynamic<uint>() == 1);
|
||||
} catch (...) {
|
||||
}
|
||||
});
|
||||
#endif // Qt < 6.5.0
|
||||
}
|
||||
}) {
|
||||
|
|
Loading…
Add table
Reference in a new issue