No description
Find a file
Magnus Groß 4dd14b81e1 Do not remove notification reference on NotificationClosed
In general we need to keep a reference to the notification id, so that
we can delete the notification later from history - unless the
NotificationClosed reason was that the user actively dismissed it, in
which case it is not kept in history anyway (so we can dismiss our
reference too).

-- Background --
Some desktop environments such as KDE keep a history of notifications.
An API is provided to delete notifications from that history by calling
the org.freedesktop.Notifications.CloseNotification endpoint with the ID
of that notification. If the notification was already closed (timed
out), then this will delete the notification from history.

The intent is to clear these notifications from the notification history
as soon as a chat with notifications originating from that person is
opened, as the user is then not interested anymore in those
notifications and to prevent unnecessary clutter in the history widget.
It is also cleared when the chat is read on another device.

-- Problem --
Telegram already has all the code in place to support this
functionality, but unfortunately this did not work on Linux before,
because we listen to the NotificationClosed signal and remove our
reference to the notification id from our internal manager as soon as we
get that signal. This means that we do not clear that notification from
history once we open the chat with that person (unless we open the chat
before the notification has timed out, i.e. if we didn't get the
NotificationClosed signal).

-- Fix --
To fix this, we keep our notification reference (if the notification was
not dismissed by the user), which means that our reference will be kept
around until we open the chat with that person (or close Telegram
entirely).

Since all the needed functionality for deleting notifications was
already in place, this patch is quite short as we only need to keep the
reference around longer than we did before this patch.

Note also that code is already in place to clear notifications for
messages that were read on another device: History::inboxRead() calls
Core::App().notifications().clearIncomingFromHistory()

Fixes #17111
2022-03-05 16:51:02 +04:00
.github Migrated dependencies in Github CI for Windows. 2022-01-05 10:48:06 +03:00
cmake@f05023bb10 Update submodules. 2022-02-28 19:43:51 +03:00
docs Fix dependencies build on M1. 2021-12-14 11:33:59 +04:00
lib/xdg Updated XDG SPEC version to 1.5. 2022-01-11 10:37:44 +03:00
snap Disable some syscalls in snap Qt build 2022-02-15 19:32:45 +03:00
Telegram Do not remove notification reference on NotificationClosed 2022-03-05 16:51:02 +04:00
.gitattributes Update lottie icons in voice chats. 2021-04-12 10:48:16 +04:00
.gitignore added CLion-generated files to .gitignore 2021-04-14 08:50:32 +03:00
.gitmodules Use QMenuBar instead of own global menu implementation on Linux 2022-01-22 21:18:37 +04:00
changelog.txt Beta version 3.5.4. 2022-03-01 19:38:33 +03:00
CMakeLists.txt Use Qt resources from a file on macOS. 2021-10-29 16:10:07 +04:00
LEGAL Update copyright year to 2022. 2022-01-04 12:49:50 +04:00
LICENSE Add single LEGAL file with license and copyright. 2018-01-03 13:04:34 +03:00
README.md Updated Qt license. 2021-10-30 14:20:20 +04:00

Telegram Desktop Official Messenger

This is the complete source code and the build instructions for the alpha version of the official desktop client for the Telegram messenger, based on the Telegram API and the MTProto secure protocol.

Version Build Status Build Status Build Status

Preview of Telegram Desktop

The source code is published under GPLv3 with OpenSSL exception, the license is available here.

Supported systems

The latest version is available for

Old system versions

Version 2.4.4 was the last that supports older systems

Version 1.8.15 was the last that supports older systems

Third-party

Build instructions