mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Added ability to check if OS has support of notifications volume.
This commit is contained in:
@@ -233,6 +233,10 @@ bool ByDefault() {
|
||||
}, HasCapability);
|
||||
}
|
||||
|
||||
bool VolumeSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Create(Window::Notifications::System *system) {
|
||||
static const auto ServiceWatcher = CreateServiceWatcher();
|
||||
|
||||
|
@@ -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); });
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user