2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Added ability to check if OS has support of notifications volume.

This commit is contained in:
23rd
2025-08-12 17:03:16 +03:00
parent 2b65857e5c
commit f40830bfc0
4 changed files with 13 additions and 0 deletions

View File

@@ -233,6 +233,10 @@ bool ByDefault() {
}, HasCapability);
}
bool VolumeSupported() {
return false;
}
void Create(Window::Notifications::System *system) {
static const auto ServiceWatcher = CreateServiceWatcher();

View File

@@ -205,6 +205,10 @@ bool ByDefault() {
return Supported();
}
bool VolumeSupported() {
return false;
}
void Create(Window::Notifications::System *system) {
system->setManager([=] { return std::make_unique<Manager>(system); });
}

View File

@@ -20,6 +20,7 @@ void MaybeFlashBounceForCustom(Fn<void()> flashBounce);
[[nodiscard]] bool Supported();
[[nodiscard]] bool Enforced();
[[nodiscard]] bool ByDefault();
[[nodiscard]] bool VolumeSupported();
void Create(Window::Notifications::System *system);
} // namespace Notifications

View File

@@ -417,6 +417,10 @@ bool ByDefault() {
return false;
}
bool VolumeSupported() {
return true;
}
void Create(Window::Notifications::System *system) {
system->setManager([=] {
auto result = std::make_unique<Manager>(system);