Commit Graph

11956 Commits

Author SHA1 Message Date
23rd 0f00d90c29 Removed unused argument when pin animation in touchbar is cancelled. 2022-03-05 17:43:49 +03:00
23rd a61ad9e2a2 Fixed possible crash in sending animation when message view is lost. 2022-03-05 17:19:38 +03:00
John Preston d2d41f978d Update Qt to 6.2.3 on macOS and Linux. 2022-03-05 17:04:10 +04:00
wangxiangqing 1ddc0c1977 Fix dir separator on windows
Change-Id: I4afe534c826127e11163f716612d62ea44705448
2022-03-05 16:54:46 +04:00
Ilya Fedin b39e4a3138 Do not call CloseNotification for activatable services
If the notification daemon is an activatable GApplication service (e.g.
on Mate), then the notification daemon may terminate a short time after
the notification has vanished (usually 15s). In that case the
notification daemon may reuse notification IDs, which is incompatible
with our notification clearing.
Also the service may not be running at all, when we call the
CloseNotification endpoint.

To fix this, we simply disable the entire notification history clearing
functionality on such desktops by proactively clearing all notification
references from our internal notification manager.

Signed-off-by: Magnus Groß <magnus.gross@rwth-aachen.de>
2022-03-05 16:51:02 +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
Ilya Fedin daaa654065 Get rid of unneeded MainWindow::Private class on Linux 2022-03-05 16:47:38 +04:00
Ilya Fedin 8db567ba7a Don't hold a dbus connection unecessarily in main window 2022-03-05 16:47:38 +04:00
Ilya Fedin 805e6de1dc Add global menu event hook on Linux just like on macOS 2022-03-05 16:47:38 +04:00
Ilya Fedin ffbafcb5fb Get rid of Q_OBJECT in macOS MainWindow 2022-03-05 16:47:38 +04:00
Ilya Fedin 1c8d4ee7ab Get rid of Q_OBJECT in HistoryInner 2022-03-05 16:47:38 +04:00
23rd f469cab7b0 Added disable-autoplay-next option. 2022-03-05 12:40:49 +03:00
23rd c6cdf0a4c4 Fixed ability to send file to photo/video album from EditCaptionBox. 2022-03-04 18:58:07 +03:00
23rd f74a75da75 Fixed display photo with modifications as file in attach media preview. 2022-03-04 18:58:07 +03:00
23rd 0e08cffedb Fixed error display in EditCaptionBox. 2022-03-04 18:58:07 +03:00
23rd f57ef43dc7 Fixed minimal height of image thumbnail in EditCaptionBox. 2022-03-04 18:58:07 +03:00
John Preston d5b9effd2e Improve title text in RTMP full screen. 2022-03-04 18:24:44 +04:00
John Preston d36315104e Improve full screen RTMP streams. 2022-03-04 16:31:04 +04:00
John Preston 8678eef9e8 Fix download bar close in a hidden window.
Fixes #24132.
2022-03-04 15:37:50 +04:00
John Preston 76a2ae4714 Don't showFullScreen() from isMaximized() state. 2022-03-04 15:28:45 +04:00
John Preston a6d59fccf4 Update icons for folders. 2022-03-04 14:25:25 +04:00
John Preston 37e5157d5a Improve "Pin on top" icon in RTMP streams. 2022-03-04 13:19:37 +04:00
23rd b5aafa521a Replaced EditLinkBox with generic box. 2022-03-04 11:25:10 +03:00
23rd 5e13949eda Added ability to initialize spellchecker without SessionController. 2022-03-04 11:25:10 +03:00
23rd b900ac2b1d Removed Window::SessionController from ManageDictionariesBox. 2022-03-04 11:25:10 +03:00
23rd 28331b3617 Removed Ui::showPeerProfile from controller of ShowInviteLinkBox. 2022-03-04 11:25:10 +03:00
23rd 026045af17 Removed Ui::show from ManageInviteLinksBox. 2022-03-04 11:25:10 +03:00
23rd bdb2a5f277 Removed Ui::show from EditAdminBox and EditRestrictedBox. 2022-03-04 11:25:10 +03:00
23rd 1f8f462461 Removed Ui::show from EditLinkedChatBox. 2022-03-04 11:25:10 +03:00
23rd cacbc60302 Removed Ui::show from AddParticipants and AddSpecial box controllers. 2022-03-04 11:25:10 +03:00
23rd 093d2ae99b Removed Ui::show from ParticipantsBoxController. 2022-03-04 11:25:10 +03:00
23rd e44b37e654 Added to PeerListDelegate methods to show content. 2022-03-04 11:25:10 +03:00
23rd e0eec138d5 Removed Ui::hideLayer from ChangePhoneBox::EnterCode. 2022-03-04 11:25:10 +03:00
23rd b0617711ed Removed Ui::hideLayer from PinMessageBox. 2022-03-04 11:25:10 +03:00
23rd fd528aa1b7 Removed Ui::show from window peer menu functions. 2022-03-04 11:25:10 +03:00
23rd 4fff812910 Moved out importChatInvite from ApiWrap. 2022-03-04 11:25:10 +03:00
23rd 0f7b0c4227 Added ability to hide layer for specific window controller. 2022-03-04 11:25:10 +03:00
23rd 3ebb9af8f8 Removed Ui::hideSettingsAndLayer(). 2022-03-04 11:25:10 +03:00
23rd bc6d69319c Provided window controller to box of converting channel to gigagroup. 2022-03-04 11:25:10 +03:00
23rd 6bcca6c94e Added Ui::Show implementation for Window::SessionController. 2022-03-04 11:25:10 +03:00
23rd ed5b83bc62 Fixed unexpected copyright reason from top bar in sections. 2022-03-02 06:11:44 +03:00
John Preston 015c5d9618 Beta version 3.5.4: Fix build with Xcode. 2022-03-01 19:43:37 +03:00
John Preston d608e046c5 Beta version 3.5.4.
- Bug fixes and other minor improvements.
2022-03-01 19:38:33 +03:00
John Preston cfa60df134 Show "No languages found." label. 2022-03-01 19:35:37 +03:00
John Preston 5ad2900c9c Hide controls in full screen stream by timeout. 2022-03-01 19:12:51 +03:00
John Preston dd5aeeb65a Show information about downloads from cloud. 2022-03-01 18:59:59 +03:00
John Preston 3262c2d1b9 Support select by drag in Downloads. 2022-03-01 18:55:35 +03:00
John Preston aa3357eee1 Show connecting / proxy status above downloads.
Fixes #24125.
2022-03-01 18:39:08 +03:00
John Preston 0192edbe84 Handle documentLoadProgress instead of itemRepaintRequest. 2022-03-01 17:32:39 +03:00
John Preston 1f38ab1690 Make local storage clear buttons non-uppercase. 2022-03-01 17:01:08 +03:00