Commit Graph

390 Commits

Author SHA1 Message Date
John Preston
af93d7cc97 History::createItem returns not_null. 2021-11-06 00:36:16 +04:00
John Preston
7a57174ab1 Register sponsored view only on full message show. 2021-11-03 15:49:48 +04:00
John Preston
2ade6be146 Show correct phrase in local join messages. 2021-10-29 18:31:06 +04:00
John Preston
185523f66f Update API scheme to layer 134. 2021-10-29 18:31:06 +04:00
Ilya Fedin
847c01d605 Add Qt 6 support
Tested only on Linux so far
2021-10-21 13:15:00 +04:00
23rd
419f6345b3 Added sponsored messages to HistoryWidget. 2021-10-07 11:09:09 +04:00
23rd
eda5cd47ad Added manager of sponsored messages. 2021-10-07 11:09:08 +04:00
John Preston
730412fefe Load albums of last chat messages. 2021-10-04 23:47:33 +04:00
John Preston
21ac2b8f3a Don't use MTP* for reply markup data. 2021-10-04 23:47:30 +04:00
John Preston
ead695b101 Don't pass wide fake MsgId through MTPMessage. 2021-09-30 15:30:39 +04:00
John Preston
1e660fc2a2 Allocate 64 bits for message ids. 2021-09-30 13:49:37 +04:00
John Preston
26b9146c32 Beta version 3.0.5: Try fixing messages skipping. 2021-09-17 14:27:34 +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
9dfc60026e Add simple forwarding options on bar click. 2021-08-31 19:47:38 +03:00
23rd
dc8eb79295 Moved code of data send actions from Data::Session to separated file. 2021-08-30 23:08:57 +03:00
John Preston
3cd0f9d189 Start non-unique ChatTheme. 2021-08-30 20:32:57 +03:00
John Preston
f3dd8c68b3 Load chat cloud themes list. 2021-08-30 20:32:57 +03:00
John Preston
f2f19b14eb Fix reading one message if last one is outgoing. 2021-08-17 18:07:20 +03:00
John Preston
116a768fde Don't use MTP* for Message flags. 2021-07-28 15:28:17 +03:00
John Preston
22e77bf3af Don't use MTP* for ReplyMarkup flags. 2021-07-28 15:16:23 +03:00
John Preston
7bbc4b7191 Add basic new messages animation. 2021-07-20 12:20:22 +03:00
Ilya Fedin
79cc797aff Fix -Wunused-variable warnings 2021-07-13 21:43:34 +03:00
John Preston
a74228acea Don't use MTP* for ChannelData flags. 2021-07-08 16:11:09 +03:00
John Preston
5040c2e766 Don't use MTP* for ChatData flags. 2021-07-08 15:11:46 +03:00
John Preston
e34375405e Don't use MTP* for UserData flags. 2021-07-08 14:19:12 +03:00
John Preston
e5ac7a1416 Fix creating a scheduled voice chat. 2021-04-12 15:36:19 +04:00
John Preston
35ff621b5b Show toast on successfull payment. 2021-04-12 12:50:31 +04:00
John Preston
1342077dcb Use 48 bit [User/Chat/Channel]Id, 56 bit PeerId. 2021-04-09 15:05:00 +04:00
John Preston
66e7f05df1 Improve scheduled voice chat top bar design. 2021-04-06 18:41:16 +04:00
John Preston
3ec3f6484f Update API scheme to layer 128. 2021-04-06 18:41:15 +04:00
Ilya Fedin
c0c10689a1 Get rid of deprecated ranges::view usage 2021-03-13 19:14:58 +03:00
Ilya Fedin
c4dcf064d5 Avoid multiple .arg usage as suggested by clazy 2021-03-13 19:08:33 +03: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
8142acc709 Remove legacy #feed code. 2021-02-25 17:03:51 +04:00
John Preston
f9f52302bb Ignore accents in contacts list sorting. 2021-02-22 23:42:42 +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
23rd
eb42a77eb7 Changed Up arrow shortcut for albums to edit item with caption.
Fixed #10134.
2021-01-22 16:53:59 +04:00
23rd
15254599e2 Unified checking for editable message. 2021-01-11 22:46:56 +03:00
John Preston
1b624d67b8 Support voice chats in legacy groups, with migration. 2020-12-14 16:52:18 +04:00
John Preston
8618fe41ee Apply new group call from new service message. 2020-12-01 09:45:22 +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
0687cea1ed Fix unpinning all messages. 2020-10-30 18:32:22 +03:00
John Preston
cd5cad72bd Use only shared media code for pinned tracking. 2020-10-30 18:32:20 +03:00
John Preston
fc92e3fadd Add pinned messages section. 2020-10-30 18:32:20 +03:00
John Preston
91a0416037 Implement local pinned bar hiding. 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
b9f40e35cd Switch between pinned messages in chat. 2020-10-30 18:32:17 +03:00
John Preston
ec35e3f081 Track multiple pinned messages in MessagesList. 2020-10-30 18:32:17 +03:00
John Preston
3d54a263b8 Stop playing documents when items are deleted. 2020-10-23 15:22:38 +03:00
John Preston
1cabfaa6a4 Fix cancel / crash in sending album to scheduled messages.
Fixes #8788
2020-10-23 11:22:38 +03:00
John Preston
e8df47c926 Show send action animations in Replies thread. 2020-09-29 19:03:30 +03:00
John Preston
d89be1d1d4 Don't read messages in channels I'm not in. 2020-09-29 19:03:27 +03:00
John Preston
ab429212e5 Respect global group read position in replies. 2020-09-29 19:03:27 +03:00
John Preston
a287dec242 Allow sending typing/send actions for Replies section. 2020-09-29 19:03:27 +03:00
John Preston
a91c078fb1 Count attachments only on visible items. 2020-09-29 19:03:26 +03:00
John Preston
9abca29f4c Show comments bar when no unread bar. 2020-09-29 19:03:25 +03:00
John Preston
883c3ecf65 Improve root message layout in Replies section. 2020-09-29 19:03:25 +03:00
John Preston
78d83a2c69 Show local sending messages in replies section. 2020-09-29 19:03:24 +03:00
John Preston
00cdae0369 Implement replies list request. 2020-09-29 19:03:18 +03:00
John Preston
55edb3bdfe Update API scheme to layer 119. Count replies. 2020-09-29 19:03:18 +03:00
John Preston
1a9c241b96 Update API scheme to layer 116. 2020-07-25 11:24:11 +04:00
23rd
11018d76f1 Added Up arrow shortcut to edit scheduled messages. 2020-07-20 21:44:07 +03:00
John Preston
2f5cb33bf2 Fix finalizing media in non-active account. 2020-07-14 19:02:27 +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
79a361ba43 Move call management to Core::App. 2020-06-25 21:57:36 +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
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
0b028b959b Move updates handling MainWidget -> Api::Updates. 2020-06-23 21:53:39 +04:00
John Preston
fc174f742a Move stickers code to Data::Stickers class. 2020-06-23 21:53:38 +04:00
John Preston
099482574e Fix sending stickers from inline bots.
Fixes #8020.
2020-06-16 20:53:44 +04:00
John Preston
bdbcd8e540 Use Main::Session in entities parsing. 2020-06-08 12:05:17 +04:00
John Preston
f066e0f05a Use Data::CloudImage for userpics. 2020-06-01 18:09:33 +04:00
John Preston
c478d96385 Add debug logs for chats reading requests. 2020-05-12 16:18:19 +04:00
John Preston
07c8aae225 Version 2.1.1: Pin to top only new bots. 2020-05-01 21:20:10 +04:00
23rd
c3c482aa50 Improved peer context menu item to archive chat. 2020-05-01 12:31:13 +04:00
John Preston
f76e094e98 Use info toast to show proxy / psa about text. 2020-04-30 15:20:50 +04:00
John Preston
b6e184d0c8 Support bots as top promoted dialog entries. 2020-04-30 11:35:01 +04:00
John Preston
042ed8f54a Support psa_message in chats list. 2020-04-30 11:35:01 +04:00
John Preston
8d632bd2be Update API scheme to layer 103. 2020-04-30 11:35:01 +04:00
John Preston
b16696db93 Don't scroll down when read from another device. 2020-04-13 15:31:54 +04:00
John Preston
2f7563767d Fix crash in archive / pinned in folder management. 2020-03-30 21:04:49 +04:00
John Preston
36d3dcd6d8 Fix marking scheduled out messages as read. 2020-03-27 20:36:06 +04:00
John Preston
3ac33e4c1c Leave unread chats in filter until closed. 2020-03-27 20:36:05 +04:00
John Preston
f0322cd107 Fix filters unread counters. 2020-03-27 20:36:03 +04:00
John Preston
55900bbd3d Save pinned chats in filters to server. 2020-03-27 20:36:03 +04:00
John Preston
e27a8fe058 Support pinned locally in filters. 2020-03-27 20:36:03 +04:00
John Preston
38a744fe5b Count unread messages in Dialogs::MainList. 2020-03-27 20:36:02 +04:00
John Preston
11d31ffc84 Parse and apply cloud filters. 2020-03-27 20:36:01 +04:00
John Preston
2f1ee6f1fa Show two hardcoded filters in Ui. 2020-03-27 20:36:01 +04:00
John Preston
71f7aae948 Replace dialogs mode with filters. 2020-03-27 20:36:01 +04:00
John Preston
b5ad3e7724 Fix unread badges for new dialogs. 2020-02-25 13:58:58 +04:00
John Preston
6f672ecdc3 Request history parts through Histories. 2020-02-21 18:48:30 +04:00
John Preston
db322cc19a Move requestDialogEntry to Histories. 2020-02-21 18:48:30 +04:00
John Preston
9bdcd08233 Don't read history for guest channels. 2020-02-21 18:48:30 +04:00
John Preston
49c4d35afa Improve working with unread bar. 2020-02-21 18:48:30 +04:00
John Preston
ee3e9af63a Remove counter from unread bar. 2020-02-21 18:48:30 +04:00
John Preston
a3f19c073b Fix 'reading' of an empty history. 2020-02-21 18:48:29 +04:00
John Preston
c8d2ac9583 Move message ownership to History. 2020-02-21 18:48:29 +04:00
John Preston
5b7f7ed70e Fix reading of currently opened chat. 2020-02-21 18:48:29 +04:00
John Preston
c04f3a7048 Don't replace local with server last message. 2020-02-21 18:48:29 +04:00
John Preston
32d93e2651 Fix several read requests together. 2020-02-21 18:48:29 +04:00
John Preston
9cccea9a87 All read history done through Data::Histories. 2020-02-21 18:48:29 +04:00
John Preston
b0e1ae3948 Prepare Data::Histories for requests interdependencies. 2020-02-21 18:48:29 +04:00
John Preston
70408f0e22 First version of reading-while-scrolling. 2020-02-21 18:48:29 +04:00
John Preston
f88466a376 Don't refresh messages redundantly.
Fixes #6781.
2019-12-10 10:49:31 +03:00
John Preston
0c713a930a Remove app.h / facades.h from precompiled header. 2019-10-01 23:59:46 +03:00
John Preston
d7cb8b7065 Version 1.8.4: Fix crash in local messages. 2019-09-06 16:41:43 +03:00
John Preston
ab6d9ff73c Fix sending first message in chat. 2019-09-06 14:14:04 +03:00
John Preston
ee0f66d746 Fix crash in history clear while sending messages.
Don't remove messages that are currently being sent from locals.
2019-09-06 10:56:01 +03:00
John Preston
7893ad0558 Mark all types of local history items. 2019-09-06 10:53:44 +03:00
John Preston
791ae64a90 Fix crash in local messages tracking. 2019-08-31 14:25:24 +03:00
John Preston
3715fa4b1e Fix scheduled notifications on inbox read. 2019-08-30 17:06:21 +03:00
John Preston
07f45b7eab Improve published scheduled notifications. 2019-08-29 10:01:28 +03:00
John Preston
0a4f91a53d Notify about published scheduled messages. 2019-08-29 10:01:28 +03:00
John Preston
03cdddfe18 Allow sending scheduled messages. 2019-08-27 19:10:37 +03:00
John Preston
3814b0833d Keep track of scheduled messages. 2019-08-27 19:10:37 +03:00
John Preston
e1fe373504 Fix localtime-related slowmode errors. 2019-08-20 12:42:37 +03:00
John Preston
02b65a42f7 Move message client flags to a separate field. 2019-08-09 20:19:23 +01:00
John Preston
d7f7a03eb4 Don't refresh large emoji messages when sent. 2019-08-09 11:51:35 +01:00
John Preston
4bad642190 Remove some more Auth() calls. 2019-08-09 11:50:49 +01:00
John Preston
230dd29af5 More large emoji layout improvements. 2019-08-09 11:50:49 +01:00
John Preston
ff44094ded Rename AuthSession to Main::Session. 2019-07-24 13:45:24 +02:00
John Preston
06982fdf04 Remove some calls to Auth(). 2019-07-24 13:13:51 +02:00
John Preston
f36e2981ca Display custom admin ranks in messages. 2019-07-24 08:02:20 +02:00
John Preston
873b77cf40 Use UserData::isBot where applicable. 2019-07-24 08:02:20 +02:00
John Preston
c50ade565a Track sending and failed messages. 2019-07-24 08:02:20 +02:00
John Preston
0005e0a3ce Track local messages, restore on history jump. 2019-07-24 08:02:20 +02:00
John Preston
01d0479335 Show slowmode button in chat. 2019-07-24 08:02:20 +02:00
John Preston
c5df4db621 Fix possible race conditions in msgid(). 2019-07-15 16:00:30 +02:00
John Preston
567bf60644 Use getters in MTP classes. 2019-07-05 16:23:07 +02:00
John Preston
4917ca7b32 Remove all legacy global namespace langs. 2019-06-21 11:06:52 +02:00
John Preston
87fc066e67 Use tr:: instead of lang(). 2019-06-21 11:06:51 +02:00
John Preston
0247e876df Remove locally saved empty histories. 2019-05-03 15:18:18 +04:00
John Preston
6f885fb6cc Fix creating dialog rows for new groups. 2019-05-02 22:30:52 +04:00
John Preston
4e8c57a861 Fix assertion violation in marking history as read. 2019-05-01 16:43:19 +04:00
John Preston
6102795856 Fix proxy promoted channel chats-list position. 2019-05-01 16:11:46 +04:00
John Preston
39008bf6fe Fix reading of client side unread messages. 2019-05-01 16:11:44 +04:00
John Preston
ca548a11d7 Fix assertion violation in History::inboxRead(). 2019-05-01 16:11:43 +04:00
John Preston
08bddc5579 Move messages data to AuthSession. 2019-05-01 16:11:42 +04:00
John Preston
5f62c2100c Count unread marks in non-fully loaded folders. 2019-05-01 16:11:40 +04:00
John Preston
2d1dcb36cb Use folder_id / still_unread_count from updates. 2019-05-01 16:11:38 +04:00
John Preston
40532e32ab Enforce changelog message visibility. 2019-05-01 16:11:38 +04:00
John Preston
ceec71d3e6 Track real latest message in the folder. 2019-05-01 16:11:37 +04:00
John Preston
8fd811517b Count unread correctly in folders. 2019-05-01 16:11:37 +04:00
John Preston
58519300ea Support pinned chats in folders. 2019-05-01 16:11:37 +04:00
John Preston
518ff146b2 Don't allow reordering of the archive. 2019-05-01 16:11:36 +04:00
John Preston
83306bb01f Replace QList with std::deque in notifications. 2019-05-01 16:11:36 +04:00
John Preston
f3ed7a674a Create dialog rows only with known folders. 2019-05-01 16:11:35 +04:00