Commit Graph

242 Commits

Author SHA1 Message Date
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 ca15fa3a97 Use sync notifications for name changes.
Search index updates must be sync or it may use new values twice.
2017-08-30 19:15:38 +03:00
John Preston e13ed9b909 Remove main()->peerUpdated and some other signals. 2017-08-30 19:15:36 +03:00
John Preston f2801d4775 Fix possible crash in file download after error.
Regression was introduced in 2fa2fa41c5.

In file download failed handler we suggest to try to load the file
once again to the same location. After some changes we started to
forget filename before failed handler. That resulted in large files
loading to memory instead of hard drive.

Add a precondition in FileLoader to prevent such bugs in the future.
2017-08-30 19:15:34 +03:00
John Preston b08732cf28 Move MediaView from MainWindow to Messenger. 2017-08-25 14:39:27 +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 070456882e Manage faved stickers from sticker context menu. 2017-08-25 14:39:09 +03:00
John Preston 91f0d049db Fix saving a loaded file as another existing file. 2017-08-01 21:14:42 +03:00
John Preston 2e5930eb58 Update full peer in profile and settings.
Not more than once in five seconds get the full info to update bio.
2017-07-26 14:53:49 +03:00
John Preston 949104d879 Improve queued by pts updates handling.
The updates are ordered by pts and applied in the correct order.
Also some pts-dependent updates handling was moved to ApiWrap.
2017-07-14 14:57:05 +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 f38fad2f92 Correctly apply edit admin in channel.
For example update adminCount / membersCount. For that we pass not
only the newRights values, but also oldRights values to applyEdit*().
2017-07-06 00:11:49 +03:00
John Preston 0c43aabfec Allow to ban from actions log user context menu. 2017-07-05 21:11:31 +03:00
John Preston 839e59075d Display log entry original data in HistoryMessage. 2017-06-30 09:21:41 +03:00
John Preston b76bfe2008 Add admin/banned/restricted box using PeerListBox. 2017-06-29 11:40:20 +03:00
John Preston 7d2d5c6100 Edit admin and restricted rights in channels. 2017-06-29 11:40:11 +03:00
John Preston 513a9f8d45 Add rich supergroup/channel admin support. 2017-06-29 11:40:10 +03:00
John Preston 110e7c8074 Finalize rename / move. 2017-06-29 11:39:38 +03:00
John Preston 0e4b057220 Fix transparent reply previews.
The transparent reply previews (for stickers) were not filled by
transparent background before resizing, now there is a flag for that.
2017-06-29 11:39:33 +03:00
John Preston 7873cb4373 Using media player for voice / video messages.
Media::Player::Widget displays the current voice / video message
if it is played and the current song otherwise.

It is created when a voice / video message starts and is destroyed
when all the voice / video messages in the playlist are finished.
2017-05-24 16:25:12 +03:00
John Preston b9119e5ef6 Play video messages as Type::Voice.
Use AudioMsgId instead of videoPlayId.
Any audio track now can be a child loader track of some video clip.
Use Type::Voice instead of Type::Video for round video messages.
Video messages play / pause / resume the same way as voice messages.
2017-05-24 16:25:09 +03:00
John Preston b74dea8662 Move logo images to Messenger. Set call panel icon. 2017-05-12 18:28:44 +03:00
John Preston 7593be4361 Display a userpic placeholder in the call panel. 2017-05-12 17:33:30 +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 3156dc0f1a Preserve video filename and mime from cloud data. 2017-05-08 17:13:16 +03:00
John Preston 7fedf24d9e Fix video message and sticker reply preview on Retina.
Wrong preview image size was a reason for image resize before
drawing the preview and it caused black background, not transparent.
2017-04-30 19:58:31 +03:00
John Preston d2c6de3df6 Play audio documents inside app by actionOnLoad. 2017-04-30 16:43:15 +03:00
John Preston e8a3535c74 Support audio documents playback inside app.
Also add some more decoders in ffmpeg configuration (wav).
Also stop audio device restart on PKEY_AudioEndpoint changes.
Also deduce channel layout from channel count in ffmpeg loaders.
2017-04-30 14:34:23 +03:00
John Preston 46690da488 Make round reply preview for video messages.
Also add a reply bar for video messages.
Also add a reply preview for stickers.
2017-04-25 13:47:52 +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 38f94c63e9 Add blocked users list in supergroups profiles. 2017-04-07 18:13:22 +03:00
John Preston 835b1801bc Remove Q_OBJECT dependency from ApiWrap.
Also remove it from SingleDelayedCall -> SingleQueuedInvocation.
2017-04-07 18:13:19 +03:00
John Preston 5444b8166c Finalize rename / move of files. 2017-04-07 18:13:18 +03:00
John Preston 3d846fcd49 Show inline bot results in a separate widget.
Add a InlineBots::Layout::Widget for inline bot results.
GIF search from EmojiPan is disabled for now.
2017-03-31 15:48:00 +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 021454dbd4 Add .jpg to inputFile filename when photo is sent.
Server has some extensions checking for inputMediaUploadedPhoto,
so force the extension to be .jpg anyway. It doesn't matter,
because the filename from inputFile is not used anywhere.

Also own PhotoData::UploadingData through std::unique_ptr.
2017-03-10 18:55:34 +03:00
John Preston a1b53c660e Show video thumbnail in SendFileBox.
Read media information (image / song / video) in SendFileBox in the
same way it is read in FileLoadTask::process() and reuse it in
FileLoadTask if it was loaded already for the box.
2017-03-10 17:14:10 +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 31009b19c6 Removed obsolete storage_file_type fields. 2017-03-04 14:28:21 +03:00
John Preston 83720d8789 Finalizing file renaming. 2017-03-04 13:23:56 +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 12705c9065 Removed legacy FileDialog::query* methods.
Everything is done easier and better through the FileDialog::Get*.
2017-02-28 19:04:52 +03:00
John Preston f8318177b9 Platform-dependent file methods called async.
Some major platform-dependent file operations refactoring.
All methods like "open file", "open file with", "show in folder"
were moved to core/file_utilities module with platform-dependent
backends. All methods interacting with DesktopServices made async.
2017-02-28 18:03:38 +03:00
John Preston 7d89b54d1c Ability to delete authorization keys added.
If we start logging in and we know, that some of the authorization
keys were read from the hard drive, not generated, we destroy all
the existing authorization keys and start generating new keys.
2017-02-25 19:48:22 +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 7adfe93a8d Alpha 1.0.10: unpinning converted chat on demand.
If we want to pin a chat and we have reached the limit we now check
for a deactivated (converted to supergroup) chat that is pinned and
is not in the chats list and just silently unpin it if it is found.

Also possible UB fix for a waveform encoding and decoding.
2017-02-16 19:47:50 +03:00
John Preston 9757489645 Moved to the latest emoji set.
Also the old MetaEmoji project was converted to codegen_emoji.
All emoji now use full string identifiers for local storage.
2017-02-15 21:27:31 +03:00