Commit Graph

320 Commits

Author SHA1 Message Date
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 255dbf9405 Fix indexing of shared media.
Add new messages to shared media index even if !loadedAtBottom().
2017-12-26 19:20:06 +03: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 977dee3599 Fix fast sharing from channels.
Grouped flag is only allowed for grouped media in forward requests.

Fixes #4198.
2017-12-18 17:29:48 +04:00
John Preston 14034c255e Replace QSharedPointer with std::shared_ptr. 2017-12-18 13:07:18 +04:00
John Preston 89ccaccb88 Display right edited badge in group with caption. 2017-12-16 20:50:43 +04:00
John Preston 1f070da202 Recount grouping after leader caption edit. 2017-12-16 20:50:43 +04:00
John Preston 963e969d2a Fix selected messages copy with grouping. 2017-12-16 20:50:43 +04:00
John Preston d9da2edd7c Improve grouped media display. 2017-12-16 20:50:43 +04:00
John Preston 3a56b7cabd Forward grouped items. Fast share grouped items. 2017-12-16 20:50:43 +04:00
John Preston 537400d8b2 Enable distinct selecting of grouped media. 2017-12-16 20:50:42 +04:00
John Preston 4c9931ab02 Support grouped media rendering. 2017-12-16 20:50:42 +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 9bbcbd4bb3 Remove all legacy media overview code. 2017-12-08 22:34:26 +04:00
John Preston c6d3fd883a Display right action button not too high. 2017-12-06 18:15:41 +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 8b3d203861 Display saved messages senders correctly. 2017-12-05 20:38:13 +04:00
John Preston 85d8273009 Implement correct saved messages history layout.
Forwarded info is displayed as a message author info (name/photo).
Outgoing messages without forwarded info are displayed as out().
Messages with save_from_ info have a button for GoToOriginal().
2017-12-05 20:14:28 +04:00
John Preston 46bafc2dcc Support Saved messages in chats list and forwards. 2017-12-05 18:07:01 +04:00
John Preston 5eeb8143b6 Move EmptyUserpic from data_peer to empty_userpic. 2017-12-05 12:44:27 +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 3bdce06e19 Use peer colors uniformly with mobile apps. 2017-12-01 14:21:40 +04:00
John Preston efdba3a482 Handle errors in getMessages(). 2017-11-23 19:41:13 +04:00
John Preston 6ca105a290 Minimal layer 72 support. 2017-11-20 23:54:05 +04:00
John Preston fe9630bb20 Allow to resize third column. 2017-11-16 07:59:11 +04:00
John Preston 65cc4d3fbc Support item repaint in Info media overview. 2017-11-16 07:59:06 +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 f162462111 Move info between Layer and Narrow wrap. 2017-11-16 07:59:03 +04:00
John Preston 41ed2d1b84 New storage for shared media messages index. 2017-11-16 07:59:02 +04:00
John Preston df64c972d8 Replace QFlags with base::flags. 2017-09-03 15:45:47 +03:00
John Preston 5a20014b1a Highlight all mentions when marking them read. 2017-08-30 19:15:53 +03:00
John Preston 4c604b34c1 Allow service messages to be unread mentions. 2017-08-30 19:15:50 +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 e209737b1a Display and follow unread mentions in history. 2017-08-30 19:15:13 +03:00
John Preston ab35829358 Remove App::app(), App::uploader(), App::api().
Also use Auth() instead of AuthSession::Current*().
2017-08-25 14:39:18 +03:00
John Preston 24b3b2a658 Fix forwarded from for single message forward.
Closes #3699, closes #3701, closes #3700.
2017-07-26 09:07:05 +03:00
John Preston e1e286aa13 Allow to fast share not games to channels.
Fixes #3692.
2017-07-26 09:07:01 +03:00
John Preston cf02a4cc31 API scheme updated to layer 70. 2017-07-23 12:34:40 +03:00
John Preston fa70bf9e0c Fix text message edit admin event log entries.
Regression was introduced in a513b1c.

In case of text messages entry->_page minimal height is counted in
the whole message minimal height and should not be added.
2017-07-23 12:33:39 +03:00
John Preston f7a354bfd1 Display "edited" mark on channel signed messages. 2017-07-18 22:00:33 +03:00
John Preston a513b1c7b3 Fix media caption edit admin event log entries. 2017-07-18 21:59:53 +03:00
John Preston a5e0b19b79 Copy correct text for a forwarded reply message. 2017-07-18 19:48:10 +03:00
John Preston 7c6bb132ce Don't display reply preview if it doesn't fit. 2017-07-18 19:47:56 +03:00
John Preston f32af6999b Add a fast share button in channels and bots. 2017-07-11 20:11:06 +03:00
John Preston da0d78135d Some refactoring in working with text entities.
Also move this code to TextUtilities namespace.
2017-07-06 14:37:42 +03:00
John Preston 545915e481 Fix name/fwd/reply/viabot info display for media. 2017-06-30 09:21:45 +03:00
John Preston 85e234938d Fix inline keyboard. Disable it in the event log.
Also disable game preview click handler in the event log.
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 624f33c5e2 Allow to select and copy text in the events log.
Also better handle window resize in the events log.
2017-06-30 09:21:42 +03:00
John Preston 693c30d264 Handle mouse events in log entry message parts.
Also highlight mentions and hashtags in them.
2017-06-30 09:21:42 +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 e39b95175b Handle channel event log mouse events. 2017-06-30 09:21:42 +03:00
John Preston 507b7d7193 Add to each history item its own width value. 2017-06-30 09:21:41 +03:00
John Preston 839e59075d Display log entry original data in HistoryMessage. 2017-06-30 09:21:41 +03:00
John Preston 4962fdf5ae Add phrases and layout for all events in log. 2017-06-30 09:21:41 +03:00
John Preston fee8690ca6 Channel action log items display and layout. 2017-06-30 09:21:41 +03:00
John Preston 9de95cee23 Drop link preview if you can't send them.
Just drop the preview when message with a web page preview is
forwarded and we're restricted to send them in the megagroup.
2017-06-29 11:40:23 +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 110e7c8074 Finalize rename / move. 2017-06-29 11:39:38 +03:00
John Preston 6869cc7d04 Fix non-square reply preview in selected messages.
After introducing video messages and sticker reply previews they may
be not a rounded rectangle but any transparent image. So instead of
painting a selected rounded rect over them we just colorize them with
an overlay color like it is done with the selected sticker images.
2017-06-29 11:39:32 +03:00
Viktor Oreshkin 3f3b9f3608 Show date from fwdHeader on tooltip
Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
2017-06-28 19:21:34 +03:00
John Preston 25587d7e8e Replace different side enums with RectPart.
Including Ui::Shadow::Side, App::RectPart and ImportantTooltip::Side.
2017-05-24 16:25:20 +03:00
John Preston 2377873c45 Add items to overviews inside HistoryMedia.
This allows one history item to exist in several media overviews.
See voice message, which should be in VoiceFiles and RoundVoiceFiles.
2017-05-24 16:25:04 +03:00
John Preston c4f90983af Redesign calls service messages. 2017-05-09 23:46:19 +03:00
John Preston 06b081f509 Add calls log box.
PeerListBox can have many rows with the same PeerData.
PeerListBox::Row can have arbitrary action on the right side.
2017-05-09 23:46:18 +03:00
John Preston 60ac7572af Display name, status and emoji in Call Panel. 2017-05-09 23:46:17 +03:00
John Preston eb240defa3 Display forwarded info in video messages. 2017-04-30 16:43:17 +03:00
John Preston 4659b664e7 Skip fwd_info for msgs from chat with yourself.
Server doesn't add fwd_info if a non-forwarded message is forwarded
from chat with yourself so don't add it locally as well.
2017-04-30 16:43:16 +03:00
John Preston da0387a23e Fix forwarded message original id. Closes #3305. 2017-04-21 13:47:39 +03:00
John Preston 0ff299758a Use correct lang phrases for video messages. 2017-04-15 22:51:44 +03:00
John Preston 5480a63beb Support round video inline playback with sound. 2017-04-12 22:37:27 +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
John Preston 23b39923ad Closed beta 1000018002: more phrases for payments.
Also replacing the Buy keyboard button with Receipt if the invoice
was payed already (like in mobile apps). This required to move the
inline markup apply before the media apply in message editing.
2017-03-30 12:49:15 +03:00
John Preston 7b5985445c Payment service messages supported. 2017-03-30 12:49:15 +03:00
John Preston 2019c24e08 Pay button and messageMediaInvoice supported.
New button type keyboardButtonBuy just shows a box with information.
WebDocument photo type is not supported yet, 'photo' is ignored.
Also HistoryMediaPtr is now implemented as a std::unique_ptr wrapper.
2017-03-30 12:49:15 +03:00
John Preston 0cc7cdd212 Added phrases for phone calls service messages.
Also refactored service message text parsing from an action object.
2017-03-30 12:49:15 +03:00
John Preston d91a2403b0 Use refs in AuthSession part getters.
Also use only AuthSession data for Contacts/Dialogs loaded state.
2017-03-15 19:24:06 +03:00
John Preston f2465eba73 Make MTPstring and MTPvector value types.
Also move MTPstring implementation to QByteArray.
2017-03-10 23:27:26 +03:00
John Preston 81790b2271 Notifications management moved to AuthSession.
Also implemented Global::WorkMode() as an base::Variable.
2017-03-06 18:38:15 +03:00
John Preston 08167a6a91 Removed #include "stdafx.h" from all files.
Currently the build without implicitly included precompiled header
is not supported anyway (because Qt MOC source files do not include
stdafx.h, they include plain headers).

So when we decide to support building without implicitly included
precompiled headers we'll have to fix all the headers anyway.
2017-03-04 12:27:52 +03:00
John Preston 63c61637f8 Moved MTP::authedId() to AuthSession::Current(). 2017-02-25 19:48:19 +03:00
John Preston ffc557a0f9 Using standard library instead of std_ namespace.
Currently tested only in VS2015.
2017-02-21 16:45:56 +03:00
John Preston 8ffdfa7923 Fixed a render glitch when highlighting a message. #3023 2017-02-18 14:38:15 +03:00
John Preston e922e5be39 Alpha 1.0.8: seek in voice messages (by waveform). 2017-02-11 01:37:37 +03:00
John Preston 8e3274cd8f Colors added in palette for selected messages.
User names in groups, text and links in messages and names
in files and shared contacts not can have different colors
in plain inbox / outbox messages and in selected messages.

Now we can use a separate color for selected parts in Text.
2017-02-09 16:46:14 +03:00
John Preston 041e366df7 Alpha 1.0.1: resize chats list with mouse press-and-drag.
Also fixed drag-n-drop images from Firefox in Windows.
Also some additional colors added to themes palette:
HistoryToDown button now has separate colors.
Windows title bar and buttons have separate active/inactive colors.
2017-01-16 16:27:11 +03:00
John Preston 4424dbf64a Allow to resize chats list. One more mode added (narrow chats list). 2017-01-16 12:55:03 +03:00
John Preston 7fb1463c43 Version 1.0 stable: bump copyright date to 2017. 2017-01-11 23:02:13 +04:00
John Preston 3da020dffd Alpha 0.10.23: tiled background fixed for macOS. 2017-01-01 21:10:35 +04:00
John Preston 218f991547 Alpha version 0.10.22: critical bug fixes. 2016-12-31 17:34:41 +04:00
John Preston ef927c8465 Theme preview ready.
Also style::color is now copyable, constructed only inside a palette.
Also macOS setup new background ready.
2016-12-30 17:53:05 +04:00
John Preston eb4d2a38b6 Closed beta 10020003: All colors moved to palette, some bug fixes. 2016-12-30 17:53:02 +04:00
John Preston 2436ad74bd Boxes redesigned. Common groups moved to Shared Media.
Also transparent images sending fixed.
2016-12-30 17:52:56 +04:00
John Preston 85b434bee4 Scheme updated. Pinned dialogs support added. 2016-12-30 17:52:53 +04:00
John Preston 06ed7b8eaf Some more ripple animations. Now only anim::value (float64).
Also each FloatAnimation now stops MTP responses.
Also slide animations done by FloatAnimation.
Closed beta 10019012.
2016-12-30 17:52:46 +04:00
John Preston a248cef15d Moved back to layer 58, fixed some style issues. 2016-12-30 17:52:44 +04:00
John Preston 7bb3b4d807 Common groups profile block done. Moved to layer 59.
Also profile block modules were renamed.
2016-12-30 17:52:42 +04:00
John Preston 8958ae0377 Typing animations from android. 2016-12-30 17:52:36 +04:00
John Preston eb05e62422 Not rounding images (photos/videos/gifs) that continue to a bubble. 2016-12-30 17:52:25 +04:00
John Preston d607f0768a Closed version 10019009: bubbles with tails. 2016-12-30 17:52:16 +04:00
John Preston 07689476a6 Closed beta 10019008: Some more ripple animations added. 2016-12-30 17:52:13 +04:00
John Preston 7fa274a68e Improved ripple animation colors and styles for different buttons.
Also moved FlatLabel and LabelSimple to ui/widgets/labels module.
Also moved ScrollArea to ui/widgets/scroll_area module.
2016-12-30 17:52:10 +04:00
John Preston d12177befd Update Telegram button added to DialogsWidget/Intro. Three dot menu. 2016-12-30 17:51:41 +04:00
John Preston 2a3fd0066d Closed beta 10019001: style::color copy is denied, only const refs. 2016-12-30 17:51:33 +04:00
John Preston e08f5437a6 Palette usage improvements. 2016-12-30 17:51:29 +04:00
John Preston dbb6371e67 First version on loading themes is ready. 2016-12-30 17:51:27 +04:00
John Preston ec6e46dae7 Some more icons moved from sprite. 2016-10-26 15:24:21 +03:00
John Preston eb47b9468c Various fixes.
Copy inline keyboard when forwarding messages with a game.
Don't show "Deleted Message" in service message with scores.
Improved tiny web page previews. Ignore right button in emoji panel.
2016-10-07 10:58:34 +03:00
John Preston 79a90956f7 Merge branch 'games_branch' 2016-10-03 18:46:01 +03:00
John Preston b600050057 Version 0.10.11: two more crash fixes. 2016-10-03 18:09:01 +03:00
John Preston 1d6aba86ba Removed channel name from first message. Fixed channel members count. 2016-10-02 10:16:33 +03:00
John Preston 376941dd5e Mixed channel access hash to the game score encrypted data.
Added new lang strings for playing game send actions (not done yet).
Also moved alot of icons from sprite to separate b&w files.
2016-09-30 15:52:03 +03:00
John Preston a5eee9bd3e Beta 10008004: games / webpages work fine if media autoload disabled.
Also moved alot of file icons from sprite to separate b&w files.
2016-09-29 22:42:14 +03:00
John Preston 1247bd19b6 No confirmations for verified game bots. Disabled Game media edition.
Also inline bot requests are sent after "@...bot" even without space.
2016-09-29 19:15:44 +03:00
John Preston 6b8d3aa48c Some layout fixes, std_::align() fixed to work in OS X 10.6-7 build. 2016-09-29 15:57:20 +03:00
John Preston 73a8d27bfd You scored phrase for game service messages. Game layout bug fix. 2016-09-29 12:10:32 +03:00
John Preston 344890c533 Game sharing and inline results supported. Qt patch updated.
Qt patch now disables QT_SCALE_FACTOR and other HighDpi
environment variables reading because tdesktop doesn't support them.
2016-09-28 19:23:25 +03:00
John Preston 5529e24000 Displaying of games finished. 2016-09-28 14:38:35 +03:00
John Preston 538ffb9727 Moved History[Media] classes to history_media_types module. 2016-09-28 13:15:03 +03:00
John Preston d277b0d4bb Some parts from history module moved to history_[item,media,message]. 2016-09-27 17:20:49 +03:00