Commit graph

673 commits

Author SHA1 Message Date
John Preston
d1536d0572 Rename / move history and historywidget modules. 2017-06-30 09:21:45 +03:00
John Preston
7357119b1a Fix scroll top overflow. Fixes #3524 2017-06-30 09:21:45 +03:00
John Preston
82912f4a0b Handle socks internal links. 2017-06-30 09:21:43 +03:00
John Preston
816ee794e8 Event log context menu + improved text selection. 2017-06-30 09:21:43 +03:00
John Preston
cedf8a65e7 Better channel log entry layout inside messages.
Also move HistoryService class to a separate module.
2017-06-30 09:21:42 +03:00
John Preston
5c87b42135 Use plain HistoryItem in channel admin events log.
Instead of using a complex AdminLog::Item use just HistoryItem*.
2017-06-30 09:21:42 +03:00
John Preston
e39b95175b Handle channel event log mouse events. 2017-06-30 09:21:42 +03:00
John Preston
1791b251ad Fix tabbed section / panel render glitches. 2017-06-30 09:21:42 +03:00
John Preston
839e59075d Display log entry original data in HistoryMessage. 2017-06-30 09:21:41 +03:00
John Preston
c3ad0ae129 Always show that bot-admin reads all messages.
A bot with any admin rights has access to messages.
2017-06-30 09:21:41 +03:00
John Preston
6ba57e713e Use forwarded messages only for one selected chat.
Different chats now can have different forwarded "drafts".
2017-06-29 11:40:26 +03:00
John Preston
5c0a1bafe2 Add supergroup restriction placeholders / labels. 2017-06-29 11:40:13 +03:00
John Preston
7d2d5c6100 Edit admin and restricted rights in channels. 2017-06-29 11:40:11 +03:00
John Preston
330b4a0b00 API scheme updated to layer 68. 2017-06-29 11:40:08 +03:00
John Preston
80273c57d0 Fix jumping to an old group message before migration.
Fixes #3513.
2017-06-29 11:40:05 +03:00
John Preston
85e6f55536 Support new plural keys format.
All the old plural phrases were changed to work with the new format.
2017-06-29 11:39:56 +03:00
John Preston
b94099e25b Realtime UI translation in all fields and buttons. 2017-06-29 11:39:51 +03:00
John Preston
2334ba1fe1 Use QString + Lang::Tag() instead of Lang::String. 2017-06-29 11:39:40 +03:00
John Preston
110e7c8074 Finalize rename / move. 2017-06-29 11:39:38 +03:00
John Preston
972fdb5c76 Fix _historyDown button position.
This button is a child widget of _scroll so the position is relative.
2017-06-29 11:39:34 +03:00
Viktor Oreshkin
68ddabea5c Don't clear undo history when applying draft
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
2017-06-29 11:10:13 +03:00
John Preston
a1f2fb46f9 Fix scroll history to down with unread bar.
Regression was introduced in 972b5078f6.

When we show history at a specific message or at unread messages we
need to clear and destroy old showFrom and unreadBar like it is done
in historyLoaded(), otherwise we always scroll to existing unreadBar.
2017-05-27 13:28:17 +03:00
John Preston
9e3f13ba2e Destroy members dropdown when the peer changes.
Also use object_ptr for passing widget in InnerDropdown.
2017-05-26 17:36:59 +03:00
John Preston
e24b0559d3 Fix message history stick to bottom.
Scroll animation should finish when we want to jump to the bottom.
2017-05-26 16:06:18 +03:00
John Preston
6052a0de0e Fix crash in history geometry update. 2017-05-25 03:11:59 +03:00
John Preston
9665d5cb45 Fix crash and improve animated scrolling.
Also fix reply returns traversing after animated scrolling.
2017-05-24 22:28:24 +03:00
John Preston
972b5078f6 Improve animated scroll to message.
Use it in replies navigation and in jumping to message history end.
2017-05-24 16:25:21 +03:00
John Preston
03aeaadd5b Update floating player position. 2017-05-24 16:25:19 +03:00
John Preston
ee6d80673a Snap floating player to column and corner. 2017-05-24 16:25:17 +03:00
John Preston
c58a48276f Hide floating player if video message is visible. 2017-05-24 16:25:15 +03:00
John Preston
b7550f63c9 Add a floating player for round video messages. 2017-05-24 16:25:15 +03:00
John Preston
0bfff65306 Add an animated scroll to current media message. 2017-05-24 16:25:14 +03:00
John Preston
2661fe5cd5 Fix crash in clear history after report spam. 2017-05-24 16:25:11 +03:00
John Preston
0339b1b54b Shrink dialogs column when enabling emoji sidebar.
Try to hold the ratio between the chat width and the dialogs list
width when the emoji sidebar is created by shrinking the left column.
2017-05-17 15:38:42 +03:00
John Preston
9f7c45e35c Fix enabling emoji sidebar from a small window.
Extend the window size after the tabbedSelectorSectionEnabled flag
is already set to true. Otherwise we extend the window and switch
to a normal from single column layout before showing the sidebar.
2017-05-17 14:50:00 +03:00
John Preston
966dcd5509 Fix render lag in the new tooltip.
Geometry update, animation cache grab and show call should be invoked
queued, because they depend on the later controls geometry update.
2017-05-17 14:15:08 +03:00
John Preston
b88a49d2f8 Show a tooltip about the emoji section toggling. 2017-05-17 12:40:03 +03:00
John Preston
8d02d81a9a Switch layout to Normal in a wide enough window.
A lot of people didn't know how to bring the dialogs column back
after it was gone in a wide single column MainWindow.

Now we switch to a two column layout if the window allows it,
preserving the emoji / stickers / GIFs section in case it is shown.
2017-05-13 15:02:07 +03:00
John Preston
d581e00299 Improve history items management.
Encapsulate HistoryBlock::y and HistoryBlock::height.
2017-05-12 16:53:08 +03:00
John Preston
3f2bed8a92 Improve report spam code. Fix a possible crash.
HistoryWidget::setReportSpamStatus was called even if the _peer
has changed to nullptr, which used this _peer and crashed.
2017-05-11 20:08:08 +03:00
John Preston
8bb4d31409 Fix crash in HistoryWidget::mousePressEvent.
When the mouse was over edit / reply and the history was closed,
mouse click handler still tried to jump to the message. Now we
update the mouse over state each time the history changes.
2017-05-11 19:11:08 +03:00
John Preston
30d000e139 Toggle calls controls using config and user flags.
Also use calls timeout values from config.
Also request config each time when the auth session changes.
2017-05-09 23:46:22 +03:00
John Preston
c4f90983af Redesign calls service messages. 2017-05-09 23:46:19 +03:00
John Preston
33f59dd3ec Fix an infinite recursion in Emoji panel/section.
HistoryWidget::resizeEvent() can start taking TabbedSelector from
TabbedPanel which will call QWidget::render() which can call again
HistoryWidget::resizeEvent() from sendPendingMoveAndResizeEvents().

Use a separate flag for _tabbedSection to prevent recursion there.
2017-05-01 11:29:02 +03:00
John Preston
4c2a0fa630 Fix top bar layout when emoji section is visible. 2017-04-30 16:58:27 +03:00
John Preston
a925822141 Generate and handle new video message links. 2017-04-30 16:43:19 +03:00
John Preston
9eea4fcf03 Update API scheme. Closes #3311, closes #3310. 2017-04-21 13:45:34 +03:00
John Preston
8e241e8b78 Improve Emoji-Stickers-GIFs panel.
Fix broken minimal panel size.
Remove HistoryWidget context menu from the panel.
2017-04-16 00:05:57 +03:00
John Preston
7b7b9db20b Add support for video messages send actions.
Animate record and upload the same way as voice messages.
2017-04-12 22:37:47 +03:00
John Preston
8eb7f1f1aa Display round video messages using HistoryGif.
Use autodownload and autoplay options from GIFs.
Also improve EditCaptionBox code.
2017-04-12 22:37:26 +03:00