mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Use GNotification only in flatpak by default
The UX is not the best without sound, so there's no advantage in using GNotification on GNOME. Remove mention about being native to GNOME as it's not true anymore.
This commit is contained in:
parent
a1e60a3f20
commit
9b66b76bac
3 changed files with 3 additions and 22 deletions
|
@ -1198,7 +1198,7 @@ void Manager::doClearFromSession(not_null<Main::Session*> session) {
|
|||
}
|
||||
|
||||
bool Manager::doSkipAudio() const {
|
||||
return _private->inhibited() || Gio::Application::get_default();
|
||||
return _private->inhibited();
|
||||
}
|
||||
|
||||
bool Manager::doSkipToast() const {
|
||||
|
@ -1206,7 +1206,7 @@ bool Manager::doSkipToast() const {
|
|||
}
|
||||
|
||||
bool Manager::doSkipFlashBounce() const {
|
||||
return _private->inhibited() || Gio::Application::get_default();
|
||||
return _private->inhibited();
|
||||
}
|
||||
|
||||
} // namespace Notifications
|
||||
|
|
|
@ -268,25 +268,7 @@ void LaunchGApplication() {
|
|||
return false;
|
||||
};
|
||||
|
||||
const auto gtkNotifications = [&] {
|
||||
try {
|
||||
if (connection && NameHasOwner(
|
||||
connection,
|
||||
"org.gtk.Notifications")) {
|
||||
return true;
|
||||
}
|
||||
} catch (...) {
|
||||
}
|
||||
|
||||
if (ranges::contains(activatableNames, "org.gtk.Notifications")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
if (OptionGApplication.value()
|
||||
|| (!KSandbox::isSnap() && gtkNotifications())
|
||||
|| (KSandbox::isFlatpak() && !freedesktopNotifications())) {
|
||||
Glib::signal_idle().connect_once([] {
|
||||
const auto appId = QGuiApplication::desktopFileName()
|
||||
|
|
|
@ -16,8 +16,7 @@ const char kOptionGApplication[] = "gapplication";
|
|||
base::options::toggle OptionGApplication({
|
||||
.id = kOptionGApplication,
|
||||
.name = "GApplication",
|
||||
.description = "Force enable GNOME's GApplication and GNotification."
|
||||
" This changes notification behavior to be native to GNOME."
|
||||
.description = "Force enable GLib's GApplication and GNotification."
|
||||
" When disabled, autodetect is used.",
|
||||
.scope = base::options::linux,
|
||||
.restartRequired = true,
|
||||
|
|
Loading…
Add table
Reference in a new issue