mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Remove #ifndef __MINGW32__ from Windows notifications
It uses C++/WinRT nowadays just like all other code so there's no point in #ifndef'ing only it
This commit is contained in:
parent
e0a0d9c039
commit
ebd0c3696a
2 changed files with 0 additions and 16 deletions
|
@ -37,7 +37,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <shellapi.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
#ifndef __MINGW32__
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Data.Xml.Dom.h>
|
||||
#include <winrt/Windows.UI.Notifications.h>
|
||||
|
@ -48,12 +47,9 @@ using namespace winrt::Windows::UI::Notifications;
|
|||
using namespace winrt::Windows::Data::Xml::Dom;
|
||||
using namespace winrt::Windows::Foundation;
|
||||
using winrt::com_ptr;
|
||||
#endif // !__MINGW32__
|
||||
|
||||
namespace Platform {
|
||||
namespace Notifications {
|
||||
|
||||
#ifndef __MINGW32__
|
||||
namespace {
|
||||
|
||||
constexpr auto kQuerySettingsEachMs = 1000;
|
||||
|
@ -376,7 +372,6 @@ bool SkipFlashBounceForCustom() {
|
|||
}
|
||||
|
||||
} // namespace
|
||||
#endif // !__MINGW32__
|
||||
|
||||
void MaybePlaySoundForCustom(Fn<void()> playSound) {
|
||||
if (!SkipSoundForCustom()) {
|
||||
|
@ -405,15 +400,11 @@ bool WaitForInputForCustom() {
|
|||
}
|
||||
|
||||
bool Supported() {
|
||||
#ifndef __MINGW32__
|
||||
if (!Checked) {
|
||||
Checked = true;
|
||||
Check();
|
||||
}
|
||||
return InitSucceeded;
|
||||
#endif // !__MINGW32__
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Enforced() {
|
||||
|
@ -425,7 +416,6 @@ bool ByDefault() {
|
|||
}
|
||||
|
||||
void Create(Window::Notifications::System *system) {
|
||||
#ifndef __MINGW32__
|
||||
if (Core::App().settings().nativeNotifications() && Supported()) {
|
||||
auto result = std::make_unique<Manager>(system);
|
||||
if (result->init()) {
|
||||
|
@ -433,11 +423,9 @@ void Create(Window::Notifications::System *system) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif // !__MINGW32__
|
||||
system->setManager(nullptr);
|
||||
}
|
||||
|
||||
#ifndef __MINGW32__
|
||||
class Manager::Private {
|
||||
public:
|
||||
explicit Private(Manager *instance);
|
||||
|
@ -992,7 +980,6 @@ void Manager::doMaybeFlashBounce(Fn<void()> flashBounce) {
|
|||
flashBounce();
|
||||
}
|
||||
}
|
||||
#endif // !__MINGW32__
|
||||
|
||||
} // namespace Notifications
|
||||
} // namespace Platform
|
||||
|
|
|
@ -14,8 +14,6 @@ struct ToastActivation;
|
|||
namespace Platform {
|
||||
namespace Notifications {
|
||||
|
||||
#ifndef __MINGW32__
|
||||
|
||||
class Manager : public Window::Notifications::NativeManager {
|
||||
public:
|
||||
Manager(Window::Notifications::System *system);
|
||||
|
@ -54,7 +52,6 @@ private:
|
|||
const std::unique_ptr<Private> _private;
|
||||
|
||||
};
|
||||
#endif // !__MINGW32__
|
||||
|
||||
} // namespace Notifications
|
||||
} // namespace Platform
|
||||
|
|
Loading…
Add table
Reference in a new issue