Commit graph

376 commits

Author SHA1 Message Date
23rd
5261e962e2 Removed Ui::show from menu item for poll stopping. 2022-04-19 09:39:01 +04:00
23rd
af0a2f182c Removed Ui::show from ShowReportItemsBox. 2022-04-19 09:39:01 +04:00
23rd
e3ac84a849 Moved boxes for reporting messages or peers to separated file. 2022-04-19 09:39:01 +04:00
23rd
148a173474 Removed animation when removing reaction with double click. 2022-04-15 13:11:32 +03:00
23rd
4304071d18 Added ability to configure quick action on double click. 2022-04-13 15:06:23 +04:00
23rd
9510d38929 Fixed reply on double click with protected content. 2022-04-12 17:35:51 +03:00
23rd
cf6b995c50 Moved out saving of ringtones to api toggling media module. 2022-04-07 19:18:47 +03:00
23rd
7b307a9e54 Added ability to save audio from chat as custom notification sound. 2022-04-06 15:21:37 +03:00
John Preston
98f2f6d4c0 Always try to save original photo bytes to disk. 2022-03-07 11:09:14 +04:00
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
John Preston
dde4868540 Add phrases to lang.string. 2022-02-27 20:26:52 +03:00
23rd
4dee21c0e6 Added userpics support to sponsored messages. 2022-02-25 19:41:16 +03:00
23rd
6939da2fd2 Fixed simple animation of message sending with custom chat themes. 2022-02-25 19:41:16 +03:00
23rd
d633860e1d Added simple animation of static stickers sending. 2022-02-25 19:41:15 +03:00
Ilya Fedin
5d5b964f4e Don't block main queue with drag operation 2022-02-22 12:45:35 +03:00
John Preston
4f1e04cf9e Animate reactions when reading. 2022-01-28 19:10:07 +03:00
John Preston
8f33d5903d Display unread reactions badge in chats list. 2022-01-28 19:10:07 +03:00
John Preston
e9c79886d2 Track unread mentions and unread reactions the same way. 2022-01-28 19:10:07 +03:00
John Preston
63d15e4479 Support Webm sticker display in chat history. 2022-01-28 19:10:07 +03:00
John Preston
28f2c213f7 Remove app module. Support delayed quit by Cmd+Q on macOS. 2022-01-27 15:54:20 +03:00
23rd
59ed41abfe Added ability to select links and monospaced text with pressed Alt key. 2022-01-26 10:39:57 +03:00
23rd
0143d22a21 Split qt_adapters to separated files. 2022-01-26 10:33:28 +03:00
John Preston
9a451a1423 Don't suggest "Set As Quick" on already quick. 2022-01-17 19:21:34 +03:00
John Preston
1657c2c7f2 Fix context menu on sent images / documents. 2022-01-17 19:21:34 +03:00
John Preston
1060b04b1e Reacted users list on inline reaction right click. 2022-01-14 21:55:48 +03:00
John Preston
5eb210ec12 "Set As Quick" context menu in reactions dropdown. 2022-01-14 21:55:48 +03:00
John Preston
f24f78c0cc Use click handler property instead of dynamic cast. 2022-01-14 21:55:48 +03:00
John Preston
490e688a91 Add reaction animations to comments. 2022-01-14 21:55:48 +03:00
John Preston
34c36d77c3 Paint reaction animations above everything. 2022-01-14 21:55:47 +03:00
John Preston
0ab26f0c82 Initial reaction effects implementation. 2022-01-14 21:55:47 +03:00
John Preston
e032dbf383 Cache reaction lottie in Window::SessionController. 2022-01-14 21:55:47 +03:00
John Preston
963694330d Correctly apply reaction restrictions. 2022-01-14 21:55:47 +03:00
John Preston
8788692fb3 Fix crash in sending a reaction. 2022-01-05 15:14:39 +03:00
John Preston
cb8f86bc8d Attach main views to correct HistoryInner-s. 2022-01-05 00:11:29 +03:00
John Preston
611be90880 Rewrite sponsored to use fake sender names. 2021-12-31 16:07:36 +03:00
John Preston
cd0db53bac For non-bubble messages reaction to the left of info. 2021-12-31 02:40:03 +03:00
John Preston
72df3a8f91 Don't show reaction button while selecting text. 2021-12-31 01:03:45 +03:00
John Preston
2c20e7bb02 Beta version 3.3.2: Fix build with GCC. 2021-12-30 00:19:47 +03:00
John Preston
a381439e3e Show reactions in replies / pinned context menu. 2021-12-29 21:22:34 +03:00
John Preston
c6811640b5 Show box with reacted users. 2021-12-29 21:22:34 +03:00
John Preston
58c9494c03 Add reactions to replies / comments / pinned section. 2021-12-29 21:22:34 +03:00
John Preston
71d52d26c3 Show react button and dropdown with a delay. 2021-12-29 21:22:34 +03:00
John Preston
ec16ca7df7 Poll reactions for visible messages. 2021-12-29 21:22:34 +03:00
John Preston
95e003153a Implement inline reactions dropdown. 2021-12-29 21:22:33 +03:00
John Preston
b396d6e836 Start from-reaction-button dropdown. 2021-12-29 21:22:33 +03:00
23rd
fa4d1d72c4 Added animation for spoilers in sections. 2021-12-29 21:22:33 +03:00
John Preston
79a09a4510 Show latest reacted in context menu. 2021-12-29 21:22:33 +03:00
John Preston
fe468ce7e9 Respect can_see_list flag in reactions. 2021-12-29 21:22:33 +03:00
John Preston
a550b73e2c Move "who read" context menu item to the bottom. 2021-12-29 21:22:33 +03:00
John Preston
a5caebe890 Toggle reactions by the button. 2021-12-29 21:22:33 +03:00