2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-25 14:58:42 +00:00

Some platform-dependent modules refactoring.

Now each platform-dependent module declares its interface in
platform/platform_module.h file and after that includes platform-
specific headers like platform/win/module_win.h with implementation.

Also removed the legacy WinRT platform-dependent implementations.
This commit is contained in:
John Preston
2017-02-28 13:51:00 +03:00
parent ae08a2f697
commit 6f0cf30b12
44 changed files with 209 additions and 3434 deletions

View File

@@ -232,7 +232,7 @@ using Notification = QSharedPointer<NotificationData>;
} // namespace
void start() {
void Start() {
if (LibNotifyLoaded()) {
if (Libs::notify_is_initted() || Libs::notify_init("Telegram Desktop")) {
ManagerInstance.createIfNull();
@@ -246,19 +246,19 @@ void start() {
}
}
Manager *manager() {
Window::Notifications::Manager *GetManager() {
if (Global::started() && Global::NativeNotifications()) {
return ManagerInstance.data();
}
return nullptr;
}
bool supported() {
bool Supported() {
return ManagerInstance.data() != nullptr;
}
void finish() {
if (manager()) {
void Finish() {
if (GetManager()) {
ManagerInstance.reset();
Libs::notify_uninit();
}