mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +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);
|
}, HasCapability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool VolumeSupported() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void Create(Window::Notifications::System *system) {
|
void Create(Window::Notifications::System *system) {
|
||||||
static const auto ServiceWatcher = CreateServiceWatcher();
|
static const auto ServiceWatcher = CreateServiceWatcher();
|
||||||
|
|
||||||
|
@@ -205,6 +205,10 @@ bool ByDefault() {
|
|||||||
return Supported();
|
return Supported();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool VolumeSupported() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void Create(Window::Notifications::System *system) {
|
void Create(Window::Notifications::System *system) {
|
||||||
system->setManager([=] { return std::make_unique<Manager>(system); });
|
system->setManager([=] { return std::make_unique<Manager>(system); });
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ void MaybeFlashBounceForCustom(Fn<void()> flashBounce);
|
|||||||
[[nodiscard]] bool Supported();
|
[[nodiscard]] bool Supported();
|
||||||
[[nodiscard]] bool Enforced();
|
[[nodiscard]] bool Enforced();
|
||||||
[[nodiscard]] bool ByDefault();
|
[[nodiscard]] bool ByDefault();
|
||||||
|
[[nodiscard]] bool VolumeSupported();
|
||||||
void Create(Window::Notifications::System *system);
|
void Create(Window::Notifications::System *system);
|
||||||
|
|
||||||
} // namespace Notifications
|
} // namespace Notifications
|
||||||
|
@@ -417,6 +417,10 @@ bool ByDefault() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool VolumeSupported() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void Create(Window::Notifications::System *system) {
|
void Create(Window::Notifications::System *system) {
|
||||||
system->setManager([=] {
|
system->setManager([=] {
|
||||||
auto result = std::make_unique<Manager>(system);
|
auto result = std::make_unique<Manager>(system);
|
||||||
|
Reference in New Issue
Block a user