Commit Graph

606 Commits

Author SHA1 Message Date
John Preston
73c0ea4b7d Don't mark as read when forwarding to scheduled. 2021-09-17 10:25:36 +03:00
John Preston
8069fdd873 Use base/random.h instead of openssl::RandomValue. 2021-09-15 13:42:22 +03:00
23rd
900a7d0b2b Appended references to const auto types in loop to prevent copying.
Suggested by Apple Clang.
2021-09-09 16:32:04 +03:00
John Preston
a6c98f4bb4 Update API scheme to layer 133. 2021-09-07 23:41:07 +03:00
John Preston
23e9e7b9f0 Remove for_const macro. 2021-09-06 13:13:26 +03:00
John Preston
9dfc60026e Add simple forwarding options on bar click. 2021-08-31 19:47:38 +03:00
John Preston
3cd0f9d189 Start non-unique ChatTheme. 2021-08-30 20:32:57 +03:00
John Preston
c79cd0b692 Use Images::Read instead of App::readImage. 2021-08-11 18:55:08 +03:00
23rd
cbad2469db Moved MTP cloud password from ApiWrap to Api::CloudPassword. 2021-08-10 15:46:18 +03:00
23rd
0ae260c6e1 Moved MTP blocked peers from ApiWrap to Api::BlockedPeers. 2021-08-10 15:46:18 +03:00
23rd
5bd73bab9b Moved user privacy from ApiWrap to Api::UserPrivacy. 2021-08-10 15:46:18 +03:00
John Preston
256546071b Add ability to reset cloud password in 7 days. 2021-07-30 14:32:49 +03:00
John Preston
116a768fde Don't use MTP* for Message flags. 2021-07-28 15:28:17 +03:00
John Preston
4276b6cce0 Use rpl for Window::Theme::Background updates. 2021-07-15 16:42:36 +03:00
Ilya Fedin
79cc797aff Fix -Wunused-variable warnings 2021-07-13 21:43:34 +03:00
John Preston
4206ff0483 Don't use MTP* for StickersSet flags. 2021-07-09 09:08:58 +03:00
John Preston
75090dedaa Don't store MTPInputStickerSet in data. 2021-07-08 22:08:59 +03:00
John Preston
f22e68fc32 Don't use MTP* for PeerSettings flags. 2021-07-08 17:32:39 +03:00
John Preston
2ffda9f240 Don't use MTP* for ChatAdminRight / ChatRestriction. 2021-07-08 13:34:06 +03:00
23rd
7cd6b821b3 Fixed update of recently attached stickers after sending. 2021-07-06 12:13:05 +03:00
23rd
e7104b5ebe Added support for archived masks. 2021-07-06 12:13:05 +03:00
23rd
2bd3a8aaff Added ability to delete and reorder mask sets.
Moved ApiWrap::stickerSetDisenabled and ApiWrap::stickersSaveOrder
to ApiWrap::saveStickerSets as lambdas.
2021-07-06 12:13:05 +03:00
23rd
1cdb83462e Added initial implementation of masks panel. 2021-07-06 12:13:05 +03:00
23rd
e05343d721 Added sending info of stickered photos. 2021-07-06 12:13:05 +03:00
23rd
6d08542afa Moved proxy global variables from facades to core settings. 2021-06-16 09:31:32 +03:00
John Preston
1342077dcb Use 48 bit [User/Chat/Channel]Id, 56 bit PeerId. 2021-04-09 15:05:00 +04:00
John Preston
a82d1e863e Version 2.7.1: Fix channels ban in admin log. 2021-03-20 18:19:31 +04:00
John Preston
3bd6b2268f Allow blocking channels in voice chats. 2021-03-20 15:43:35 +04:00
John Preston
a0a13c3b86 Update API scheme to layer 126. 2021-03-20 15:43:35 +04:00
Ilya Fedin
4ffe1d3acc Use base::flat_map for pointer keys 2021-03-15 19:49:06 +03:00
Ilya Fedin
c0c10689a1 Get rid of deprecated ranges::view usage 2021-03-13 19:14:58 +03:00
Ilya Fedin
f25b2a2094 Apply autofixes from clazy 2021-03-13 15:25:47 +03:00
John Preston
c9934c142d Fix drafts time tracking. 2021-03-13 16:07:59 +04:00
23rd
d4bb62d055 Slightly refactored uploading of edit media. 2021-03-13 12:59:11 +03:00
John Preston
68b0a85369 Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
John Preston
5794679277 Don't accept drafts older than last saved.
I hope it finally fixes #4922, partially fixes #10001.

The rest of #10001 like RAM usage / crashes are unrelated to drafts.
2021-03-12 16:58:26 +04:00
John Preston
267e5fd9e0 Allow getting outer_msg_id in MTProto handlers. 2021-03-12 16:58:26 +04:00
John Preston
8142acc709 Remove legacy #feed code. 2021-02-25 17:03:51 +04:00
John Preston
502a3ca70f Update API scheme to layer 124. 2021-02-22 23:42:40 +04:00
John Preston
8f0e23bb25 Improve editing messages with link previews.
Now preview state can be one of (allowed, cancelled, empty-in-edit).

In case of editing a message without preview we set the state to
empty-in-edit and it changes to allowed if the links in the message
are changed somehow.

That way we don't need to cancel the preview when editing a message
with a cancelled preview and at the same time adding a link to
a message that had no preview in the first place will add a preview.
2021-01-29 15:27:17 +04:00
John Preston
b2c84d675c Allow clearing calls log. 2021-01-25 16:50:59 +04:00
John Preston
417428b21d Allow deleting small groups for everyone. 2021-01-25 16:50:59 +04:00
John Preston
34f7391ec9 Update API scheme. 2021-01-25 16:50:58 +04:00
John Preston
02ad5f2772 Update API scheme and start invite links. 2021-01-25 16:47:40 +04:00
John Preston
b396244606 Update API scheme to layer 123. 2021-01-25 16:47:40 +04:00
23rd
d4bbbdb65c Replaced rand_value util function with openssl::RandomValue. 2021-01-24 10:41:10 +03:00
23rd
dd01ece14a Replaced snap util function with std::clamp. 2021-01-24 10:41:10 +03:00
John Preston
d16bc36bae Update API scheme. 2020-12-22 22:39:30 +04:00
John Preston
92bc278052 Allow inviting contacts to voice chats. 2020-12-22 12:33:06 +04:00
John Preston
b6483cb65c Use shared_ptr<Memento> for sections. 2020-12-14 18:48:10 +04:00
23rd
c8643aa1ee Wrapped raw SectionMemento with unique_ptr. 2020-12-14 17:09:24 +04:00
John Preston
e523687328 Show bar waves from any member-s level. 2020-12-09 13:08:36 +04:00
John Preston
b1ed15447b Scroll to bottom when sending a poll. 2020-11-19 17:01:50 +03:00
John Preston
00504b61cd Allow all messages silent in support mode. 2020-11-19 16:23:57 +03:00
John Preston
b3eb7858e6 Save local drafts in scheduled / replies sections.
Fix inline bot switch inline in scheduled / replies sections.
2020-11-17 12:58:07 +03:00
John Preston
74d2313784 Build Linux version with Qt 5.15.1 in CentOS 7 docker. 2020-11-06 11:21:34 +03:00
John Preston
f2867df340 Fix sending of album with videos.
Fixes #8960.
2020-11-02 11:50:14 +03:00
John Preston
cd5cad72bd Use only shared media code for pinned tracking. 2020-10-30 18:32:20 +03:00
John Preston
a614ccad97 Correctly check media when editing files. 2020-10-30 18:32:19 +03:00
John Preston
012ebdd15e Fix grouping of music files / just files. 2020-10-30 18:32:19 +03:00
John Preston
bb4fdde616 Fix sending many files with a comment. 2020-10-30 18:32:19 +03:00
John Preston
85d08c8f52 Send files grouped in albums, show captions. 2020-10-30 18:32:19 +03:00
John Preston
0539cc9448 Add a way to recreate SendFilesBox content. 2020-10-30 18:32:19 +03:00
John Preston
8d2fa313b7 Add setting for grouping files. 2020-10-30 18:32:19 +03:00
John Preston
b3b11bd9e7 Move PreparedFile/PreparedList to td_ui. 2020-10-30 18:32:18 +03:00
John Preston
ae298818a8 Implement message bar with animations. 2020-10-30 18:32:17 +03:00
John Preston
cc28ba4284 Update API scheme to layer 120. 2020-10-30 18:32:17 +03:00
23rd
1459e6f38e Moved request for attached stickers to separate file. 2020-10-30 13:18:40 +03:00
23rd
6ac5f32796 Moved other authorizations api request to separated file. 2020-09-30 18:48:34 +03:00
John Preston
891b4a91a3 Generate correct links to replies section. 2020-09-29 19:03:28 +03:00
John Preston
01ab6e6d4d Support anonymous group admins. 2020-09-29 19:03:24 +03:00
John Preston
f0e1d2fd02 'base::optional_variant<' -> 'std::variant<v::null_t,' 2020-09-29 19:03:19 +03:00
John Preston
734d834a20 Replace mapbox variant with std::variant. 2020-09-29 19:03:19 +03:00
John Preston
55edb3bdfe Update API scheme to layer 119. Count replies. 2020-09-29 19:03:18 +03:00
John Preston
49c230b898 Update API scheme to layer 118. 2020-09-29 19:03:18 +03:00
23rd
8a34f29329 Moved toggling of existing media to separate file. 2020-08-19 14:47:25 +03:00
John Preston
4bf6550e24 Update API scheme to layer 117. 2020-08-11 18:21:40 +04:00
John Preston
3aea9cb3ca Add archive and mute settings editing. 2020-07-25 11:24:37 +04:00
John Preston
1a9c241b96 Update API scheme to layer 116. 2020-07-25 11:24:11 +04:00
John Preston
638d4d63c5 Update API scheme to layer 115. 2020-07-25 11:24:11 +04:00
John Preston
d4feb16378 Don't mark as read when scheduling messages. 2020-07-23 17:46:52 +04:00
23rd
2ebf44c166 Removed unused code from apiwrap. 2020-07-17 18:22:38 +03:00
23rd
c350e33dd8 Moved preparing MTPInputMedia to separate file. 2020-07-17 18:22:37 +03:00
John Preston
900f7e1304 Try recursive lambda without make_shared. 2020-07-14 19:02:45 +04:00
Sean Wei
556aa28df6 Remove unused variable
The following are commits related to removed variables.

apiwrap.cpp
e050e27: kSaveDraftBeforeQuitTimeout

app.cpp
113f665: serviceImageCacheSize

boxes/auto_download_box.cpp
a0c6104: checked(Source source, Type type)

boxes/background_preview_box.cpp
b6edf45: resultBytesPerPixel
fe21b5a: ms

boxes/calendar_box.cpp
ae97704: yearIndex, monthIndex
99bb093: ms

boxes/connection_box.cpp
f794d8d: ping

boxes/dictionaries_manager.cpp
8353867: session

boxes/peer_list_box.cpp
2ce2a14: grayedWidth

boxes/peers/add_participants_box.cpp
07e010d: chat, channel

boxes/self_destruction_box.cpp
fe9f02e: count

chat_helpers/emoji_suggestions_widget.cpp
a12bc60: is(QLatin1String string)

chat_helpers/field_autocomplete.cpp
8c7a35c: atwidth, hashwidth

chat_helpers/gifs_list_widget.cpp
ff65734: inlineItems
3d846fc: newSelected
d1687ab: kSaveDraftBeforeQuitTimeout

chat_helpers/stickers_dice_pack.cpp
c83e297: kZeroDiceDocumentId

chat_helpers/stickers_emoji_pack.cpp
d298953: length

chat_helpers/stickers_list_widget.cpp
eb75859: index, x

core/crash_reports.cpp
5940ae6: LaunchedDateTimeStr, LaunchedBinaryName

data/data_changes.cpp
3c4e959:clearRealtime

data/data_cloud_file.cpp
4b354b0: fromCloud, cacheTag

data/data_document_media.cpp
7db5359: kMaxVideoFrameArea

data/data_messages.cpp
794e315: wasCount

data/data_photo_media.cpp
e27d2bc: index

data/data_wall_paper.cpp
b6edf45: resultBytesPerPixel

data/data_types.cpp
aa8f62d: kWebDocumentCacheTag, kStorageCacheMask

history/admin_log/history_admin_log_inner.cpp
794e315: canDelete, canForward

history/history_location_manager.cpp
60f45ab: kCoordPrecision
9f90d3a: kMaxHttpRedirects

history/history_message.cpp
cedf8a6: kPinnedMessageTextLimit

history/history_widget.cpp
b305924: serviceColor
efa5fc4: hasForward
5e7aa4f: kTabbedSelectorToggleTooltipTimeoutMs, kTabbedSelectorToggleTooltipCount

history/view/history_view_context_menu.cpp
fe1a90b: isVideoLink, isVoiceLink, isAudioLink

settings.cpp
e2f54eb: defaultRecent

settings/settings_folders.cpp
e8bf5bb: kRefreshSuggestedTimeout

ui/filter_icon_panel.cpp
c4a0bc1: kDelayedHideTimeoutMs

window/themes/window_theme_preview.cpp
ef927c8: mutedCounter

-----

Modified variables

boxes/stickers_box.cpp
554eb3a: _rows[pressedIndex] -> set

data/data_notify_settings.cpp
734c410: muteForSeconds -> muteUntil

history/view/history_view_list_widget.cpp
07528be: _items[index] -> view
e5f3bed: fromState, tillState

history/history.cpp
cd3c1c6: kStatusShowClientsideRecordVideo -> kStatusShowClientsideRecordVoice

storage/download_manager_mtproto.cpp
ae8fb14: _queues[dcId] -> queue

storage/localstorage.cpp
357caf8: MTP::Environment::Production -> production
2020-07-13 09:33:55 +04:00
John Preston
e7b8a52278 Move terms lock from Core::App to Session. 2020-06-24 11:56:16 +04:00
John Preston
30c82bb2e0 Remove some MainWindow::sessionController() calls. 2020-06-23 21:53:44 +04:00
23rd
e318a7d65f Simplified ranges::find_if with ranges::any_of and ranges::none_of. 2020-06-23 21:53:43 +04:00
John Preston
2635ca33f8 Move background to global settings. 2020-06-23 21:53:42 +04:00
John Preston
997913be25 One Window::Notifications system for all sessions. 2020-06-23 21:53:42 +04:00
John Preston
83538675ce Move a lot of settings to Core::Settings. 2020-06-23 21:53:42 +04:00
John Preston
4d6cc58f0d Move session settings to main_session_settings. 2020-06-23 21:53:42 +04:00
John Preston
3a5ede534e Count all accounts in Core::App().unreadBadge. 2020-06-23 21:53:41 +04:00
John Preston
357caf8007 Keep separate MTP::Config's for separate accounts. 2020-06-23 21:53:41 +04:00
John Preston
f450f81215 Remove non-UI calls to App::main. 2020-06-23 21:53:40 +04:00
John Preston
3c4e959468 Replace observer_peer with rpl interface. 2020-06-23 21:53:40 +04:00
John Preston
0ad7dcaef9 Remove MTP::MainInstance() global access point. 2020-06-23 21:53:40 +04:00
John Preston
0b028b959b Move updates handling MainWidget -> Api::Updates. 2020-06-23 21:53:39 +04:00
John Preston
ee43027bea Remove some usages of App::main(). 2020-06-23 21:53:39 +04:00
John Preston
ad4afe9293 Move session data localstorage -> storage_account. 2020-06-23 21:53:39 +04:00