mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 06:07:45 +00:00
Add proper build-time checks to AutostartSupported on Linux
This commit is contained in:
parent
70b039a6e4
commit
4ade80905f
@ -572,11 +572,15 @@ std::optional<bool> IsDarkMode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool AutostartSupported() {
|
bool AutostartSupported() {
|
||||||
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
// snap sandbox doesn't allow creating files
|
// snap sandbox doesn't allow creating files
|
||||||
// in folders with names started with a dot
|
// in folders with names started with a dot
|
||||||
// and doesn't provide any api to add an app to autostart
|
// and doesn't provide any api to add an app to autostart
|
||||||
// thus, autostart isn't supported in snap
|
// thus, autostart isn't supported in snap
|
||||||
return !KSandbox::isSnap();
|
return !KSandbox::isSnap();
|
||||||
|
#else // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
return false;
|
||||||
|
#endif // DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutostartToggle(bool enabled, Fn<void(bool)> done) {
|
void AutostartToggle(bool enabled, Fn<void(bool)> done) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user