Commit Graph

326 Commits

Author SHA1 Message Date
John Preston 8060cb7426 Start HistoryView::Message class for item view. 2018-02-08 12:20:47 +03:00
John Preston 794e31505b First version of feed section view. 2018-02-08 12:20:46 +03:00
John Preston 782e70b171 Support basic feed display in chats list. 2018-02-08 12:20:46 +03:00
John Preston 9d2239291d Add support for pinned feeds management. 2018-02-08 12:20:46 +03:00
John Preston 6a9556d42c Move non-settings session data to Data::Session.
Rename AuthSessionData to AuthSessionSettings, move data away.
2018-02-08 12:20:46 +03:00
John Preston 31234cb487 API scheme updated to layer 75. 2018-02-08 12:20:45 +03:00
John Preston ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston 0ef3e19bc2 Use QImage instead of QPixmap for theme preview.
Working with QPixmap from non-main thread is not defined.
2018-01-02 22:10:49 +03:00
John Preston af552fb4c0 Replace base/task_queue with crl. 2017-12-31 00:28:38 +03:00
John Preston 5b4694a4eb Move text options constant to a separate module.
Also start MediaView group thumbs code.
2017-12-28 16:06:06 +03:00
John Preston 2569df9e5a Rename some Ui methods.
myEnsureResized -> Ui::SendPendingMoveResizeEvents.
myGrab -> Ui::GrabWidget.
myGrabImage -> Ui::GrabWidgetToImage.
2017-12-26 19:20:08 +03:00
John Preston 8e45b09083 Use different indentation for rpl operators.
It works better with Visual Studio IDE.
2017-12-26 19:20:07 +03:00
John Preston e023092744 Use RectPart(s) instead of ImageRoundCorner(s). 2017-12-18 21:54:11 +04:00
John Preston 92333e982c Move message components to history_item_components.
Also fix channel signatures rendering.
2017-12-18 19:52:36 +04:00
John Preston 14034c255e Replace QSharedPointer with std::shared_ptr. 2017-12-18 13:07:18 +04:00
John Preston 3c101b0a50 Remove limit on chats list width.
Fixes #4146.
2017-12-12 18:56:37 +04:00
John Preston 8b69e6ab99 Rename some methods in DocumentData.
Also fix voice message mark as read when autoplaying after previous.
Also show play icon and don't show playlist for audio files that do
not have shared music files attributes but have audio file mime type.
2017-12-10 14:28:04 +04:00
John Preston 5a7d8bcffb Add audio playlist using Info::Media::ListWidget. 2017-12-09 19:13:06 +04:00
John Preston a403ad7d37 Always pass all users to add group member box. 2017-12-08 18:25:29 +04:00
John Preston f8963d7e4b Read silent flag from PeerData, not SilentToggle. 2017-12-08 15:52:12 +04:00
John Preston 79398fe6cf Add call button to Info::Profile top bar. 2017-12-07 19:17:53 +04:00
John Preston 5bc47e5203 Move shareContact and readServerHistory to ApiWrap.
Also allow non-confirming contact info sharing to Saved Messages.
2017-12-07 17:43:05 +04:00
John Preston f0a03223e8 Share contact instantly to Saved Messages. 2017-12-07 12:56:10 +04:00
John Preston d77afef8b0 Hide Share contact button in saved messages. 2017-12-06 18:41:37 +04:00
John Preston 775cede16f Use separate phrases for clearing saved messages. 2017-12-06 18:39:27 +04:00
John Preston 1473c14668 Forward messages to Saved Messages instantly. 2017-12-06 17:56:40 +04:00
John Preston 6764a3cc86 Replace SelectedItemSet with MessageIdsList.
Use vector<FullMsgId> everywhere instead QMap<..,HistoryItem*>.
The old way the app crashed in case some messages were deleted.
If the items are needed use HistoryItemsList=vector<HistoryItem*>.
2017-12-06 14:13:38 +04:00
John Preston 3845985a6b Fix third column appearing on window resize. 2017-12-06 11:05:34 +04:00
John Preston 993877b0d4 Change main menu cloud icon to saved messages. 2017-12-05 20:48:03 +04:00
John Preston 46bafc2dcc Support Saved messages in chats list and forwards. 2017-12-05 18:07:01 +04:00
John Preston 62568daffe Refactor NotifySettings in PeerData. 2017-12-04 21:48:45 +04:00
John Preston e1c68892d4 Show third column only when explicitly requested.
This allows you to show info in layer from mention links.
2017-12-04 13:42:05 +04:00
John Preston 8391d43057 Use EditPeerInfoBox for editing groups.
This allows to edit group invite links.
Rename EditNameTitleBox to EditNameBox, used only from Settings.
2017-12-02 16:04:22 +04:00
John Preston 85b3d3f64d Display admin badges in supergroups.
Also prefer std containers to Qt and OrderedSet in data_peer.
2017-12-01 22:38:44 +04:00
John Preston 595af2c6d9 Rename weak(QObject*) to make_weak(QObject*). 2017-11-30 22:04:13 +04:00
John Preston 2bbf17b672 Fix t.me/share links.
Regression was introduced in ffc20e4492.

Fixes #4099.
2017-11-30 21:47:58 +04:00
John Preston 43570d1613 Check current chat before auto-closing it.
Close current chat only if it is the one being delete-and-exit'ed.
2017-11-30 21:35:35 +04:00
John Preston a0c8d522ef Save window extension on layer->section migration.
If the third section is shown inside the existing window remember
it as a zero window extension or third section show. That way it
will hide correctly when it is closed by X button.

Partially fixes #4091.
2017-11-30 17:08:51 +04:00
John Preston c10588a7dc Merge group-supergroup history in jump-to-date.
Fixes #4094.
2017-11-30 16:50:13 +04:00
John Preston 196ff7f4c1 Don't apply count from getParticipants(Recent). 2017-11-28 22:30:01 +04:00
John Preston d014b47958 Move Info::TopBarOverride to Info::TopBar.
This allows to improve animations in shared media items selection.
2017-11-27 15:43:57 +04:00
John Preston 0ced28f991 Nice animations when selecting shared media items. 2017-11-24 19:47:09 +04:00
John Preston 2387b66e86 Allow supergroup members to clear history. 2017-11-22 12:04:24 +04:00
John Preston b337d54623 Use custom base::overload() helper. 2017-11-21 18:27:48 +04:00
John Preston 44e94bfbf5 Add workaround for macOS leaveEvent() bugs.
On macOS sometimes when mouse leaves the window we don't receive leaveEvent()
calls in the nested widgets, like buttons, only for the window itself.
2017-11-21 18:27:48 +04:00
John Preston 6ca105a290 Minimal layer 72 support. 2017-11-20 23:54:05 +04:00
John Preston f1f955b7ac Pass already-members when adding members to channel. 2017-11-19 18:41:52 +04:00
John Preston c872cd76e1 Improve window extension by third column. 2017-11-16 20:43:52 +04:00
John Preston cf977cb41a Improve history -> profile top bar navigation. 2017-11-16 19:24:01 +04:00
John Preston 131efa11be Various fixes. 2017-11-16 11:45:55 +04:00
John Preston 7fdeab829f Paint native title instead of using custom. 2017-11-16 07:59:12 +04:00
John Preston defa0ae4d0 Improve stickers list variable width support. 2017-11-16 07:59:12 +04:00
John Preston aecc119bac Add fast chat photo upload to info profile. 2017-11-16 07:59:11 +04:00
John Preston 8dd3f24285 Replace Profile::UserpicButton with one from Ui:: 2017-11-16 07:59:11 +04:00
John Preston 830c6a4894 Replace PeerAvatarButton with UserpicButton. 2017-11-16 07:59:11 +04:00
John Preston 3d37ac9235 Replace NewAvatarButton with UserpicButton.
This new control should also replace PeerAvatarButton and
Profile::UserpicButton and deliver all the best of those three.
2017-11-16 07:59:11 +04:00
John Preston 3deea14559 Remove old shared media overview section.
Also move window/top_bar_widget to history/history_top_bar_widget.
2017-11-16 07:59:11 +04:00
John Preston 866ff628b7 Fix render bug, enable wide third column. 2017-11-16 07:59:11 +04:00
John Preston fe9630bb20 Allow to resize third column. 2017-11-16 07:59:11 +04:00
John Preston bca9b3ca3f Extract a reusable Ui::ResizeArea class. 2017-11-16 07:59:11 +04:00
John Preston 3a25313e61 Fix restoring shared media state. 2017-11-16 07:59:11 +04:00
John Preston 0255d0c59e Support any size in the tabbed selector. 2017-11-16 07:59:10 +04:00
John Preston 3998fad7ef Add manage supergroup / channel box. 2017-11-16 07:59:10 +04:00
John Preston 5f0ba48309 Add top bar menu and notifications toggle. 2017-11-16 07:59:10 +04:00
John Preston 9743dc1ffb Add some more actions to three dot menu. 2017-11-16 07:59:10 +04:00
John Preston fcf2b9d1a7 Add some more actions to info profile. 2017-11-16 07:59:10 +04:00
John Preston 8191ebfc49 Improve peer context menu for info. 2017-11-16 07:59:09 +04:00
John Preston a05c7a815a Fix animation lag in info layer wrap. 2017-11-16 07:59:09 +04:00
John Preston 9a56b2d20f Move dialogsWidthRatio to AuthSessionData. 2017-11-16 07:59:09 +04:00
John Preston 508fa14385 Workaround render glitches on new MacBooks.
For unknown reason large windows have bad render glitches in High Sierra.
Forcing of OpenGL composition (by adding a fake child QOpenGLWidget) fixes it.
2017-11-16 07:59:07 +04:00
John Preston e02d209e6f Fix build with GCC. 2017-11-16 07:59:07 +04:00
John Preston 76b8078bd9 Save section expand state in Info memento. 2017-11-16 07:59:06 +04:00
John Preston c6c75a1980 Animate Info-to-Info transitions. 2017-11-16 07:59:06 +04:00
John Preston 93c15e5ee6 Use internal section stack in Info::WrapWidget. 2017-11-16 07:59:06 +04:00
John Preston 83850d9b86 Change *[Fast|Animated] to anim::type in FadeWrap. 2017-11-16 07:59:06 +04:00
John Preston d1687ab963 Improve info wrapping in section / layer.
Also move layerwidget to window/layer_widget.
Also replace ui/effects/widget_fade_wrap with ui/wrap/fade_wrap.
2017-11-16 07:59:05 +04:00
John Preston 5cc7cb1d85 Allow empty arg list in rpl next/error handlers. 2017-11-16 07:59:05 +04:00
John Preston 086e46c162 Add and use only rpl::start_with_*() methods. 2017-11-16 07:59:05 +04:00
John Preston 1a0e524b49 Optimize third column (create it only once).
Before historyPeer and historyPeerCanWrite were independent, so we
created a new Info section for both of them changing.

Now we use Data::CanWriteValue(peer) and rpl::flatten_latest().
2017-11-16 07:59:04 +04:00
John Preston ffc20e4492 Divide structs into several data/ modules. 2017-11-16 07:59:04 +04:00
John Preston f2a5862714 Add members list to info profile. 2017-11-16 07:59:04 +04:00
John Preston b9fb9af74f Info shared media and common groups counters. 2017-11-16 07:59:04 +04:00
John Preston e1ba9f8ff8 Hide send message in Info for current chat. 2017-11-16 07:59:04 +04:00
John Preston f4d9618487 Improve layer / section exchange for Info. 2017-11-16 07:59:04 +04:00
John Preston 1a4d326abb Show Info if writing is forbidden. 2017-11-16 07:59:03 +04:00
John Preston 48cbdd9d40 Don't toggle tabbed section from OneColumn. 2017-11-16 07:59:03 +04:00
John Preston c0e780a28f Allow small dialogs list with three columns. 2017-11-16 07:59:03 +04:00
John Preston 5586d231de Switch Info between columns and layer. 2017-11-16 07:59:03 +04:00
John Preston 766e7dadb1 Use improved rpl::start(). 2017-11-16 07:59:03 +04:00
John Preston 5e7aa4ff81 Move third column from HistoryWidget to MainWidget. 2017-11-16 07:59:03 +04:00
John Preston f162462111 Move info between Layer and Narrow wrap. 2017-11-16 07:59:03 +04:00
John Preston 088d23d557 Start new Info section (profile + shared media). 2017-11-16 07:59:02 +04:00
John Preston fbcd5e2f1e Try to use const-ref better in rpl. 2017-11-16 07:59:02 +04:00
John Preston c302219f9e Use rpl in some widgets and effects. 2017-11-16 07:59:02 +04:00
John Preston c09fbcfeb3 Display author photo / name in search results. 2017-09-05 20:21:56 +03:00
John Preston 2e374e68c5 Fix working with layers.
Regression was introduced in df64c97.

New base::flags work correctly only if all mutually exclusive flag
values use mutually exclusive bits (a & b == 0 for exclusive (a, b)).

Closes #3856.
2017-09-03 22:49:33 +03:00
John Preston df64c972d8 Replace QFlags with base::flags. 2017-09-03 15:45:47 +03:00
John Preston 25ffaaaa2d Replace t_assert() with Assert().
Also use this assertions for Expects(), Ensures() and Unexpected().
2017-08-30 19:15:42 +03:00
John Preston b3da99c302 Replace gsl::not_null<T*> with just not_null<T*>. 2017-08-30 19:15:41 +03:00
John Preston a72453fb1b Remove ContactsBox and contacts_box module. 2017-08-30 19:15:30 +03:00