Commit Graph

73 Commits

Author SHA1 Message Date
John Preston
ebd4651ac2 Manage unread bar using HistoryView::Element-s. 2018-02-08 12:20:50 +03:00
John Preston
7425e80f05 Use HistoryMedia as view, add Data::Media. 2018-02-08 12:20:48 +03:00
John Preston
ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston
af552fb4c0 Replace base/task_queue with crl. 2017-12-31 00:28:38 +03:00
John Preston
14034c255e Replace QSharedPointer with std::shared_ptr. 2017-12-18 13:07:18 +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
007ab3b7b8 Fix crash in RSA public key wrapper. 2017-12-07 09:34:11 +04:00
Nicholas Guriev
93809ec404 Fix build against OpenSSL 1.1
Closes: #3196
2017-12-07 09:15:10 +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
2432845df2 Optimize and rename base::weak_unique_ptr.
Rename base::enable_weak_from_this -> base::has_weak_ptr.
Rename base::weak_unique_ptr -> base::weak_ptr.
Rename base::make_weak_unique -> base::make_weak.
Rename base/weak_unique_ptr.h -> base/weak_ptr.h
2017-11-30 21:33:27 +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
67d4eb688a Reverse user and chat profile photos. 2017-11-23 13:58:12 +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
d93c1ccbaa Improve compile time. 2017-11-21 14:20:52 +04:00
John Preston
ac99318f34 Use ranges:: algorithms instead of base:: 2017-11-20 16:24:00 +04:00
John Preston
8ff0120642 Add EditPeerInfoBox without saving. 2017-11-16 07:59:10 +04:00
John Preston
86ad15612a Use Info::Controller for the whole info section. 2017-11-16 07:59:08 +04:00
John Preston
c9152b0b3a Cache media search results until empty query. 2017-11-16 07:59:08 +04:00
John Preston
eb2719fad1 Added search to files and links shared media. 2017-11-16 07:59:08 +04:00
John Preston
a27edcad1c Extract SparseIdsList module from SharedMedia.
This way it can be reused in search results management.
2017-11-16 07:59:08 +04:00
John Preston
f6ed3dff7f Rewrite base::lambda_guard, use only one pointer.
Support base::enable_weak_from_this for guarding, not only QObject,
in base::lambda_guard, in App::CallDelayed and in App::LambdaDelayed.

Allow only one guarding pointer, no places in code use more than one.
2017-11-16 07:59:08 +04:00
John Preston
101d4f6444 Use std::function for base::lambda implementation.
base::lambda becomes just std::function and base::lambda_once becomes
base::unique_function - a move-only wrapper around std::function.

This is required because Visual C++ 2017 15.4.1 has a compiler bug
with static member variables of class templates, they may collide.

The std::function uses inheritance and virtual functions instead of
custom vtables done by static members of class templates used in
custom base::lambda implementation, so they work fine.
2017-11-16 07:59:08 +04:00
John Preston
b51f865c54 Save info members list state to memento. 2017-11-16 07:59:08 +04:00
John Preston
5b190c5098 Preserve TopBarOverride in Info WrapWidget.
Also support better selection in info shared media.
Also fix build for Xcode.
2017-11-16 07:59:07 +04:00
John Preston
54cc3e6315 Shared media multiple items selection. 2017-11-16 07:59:07 +04:00
John Preston
fdd89d65ca Allow using custom comparators in flat_[map|set]. 2017-11-16 07:59:06 +04:00
John Preston
ea0f6b9a12 Use 'if constexpr ()' instead of tag dispatch. 2017-11-16 07:59:05 +04:00
John Preston
80d9938e96 Support and use not type-erased consumers. 2017-11-16 07:59:05 +04:00
John Preston
fddcdf359b Use not type-erased producers in code. 2017-11-16 07:59:05 +04:00
John Preston
ffc20e4492 Divide structs into several data/ modules. 2017-11-16 07:59:04 +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
2363a6bd44 Add SharedMediaSlice to observe shared media.
Start testing / using it in MediaView.
2017-11-16 07:59:02 +04:00
John Preston
41ed2d1b84 New storage for shared media messages index. 2017-11-16 07:59:02 +04:00
John Preston
b873fee1cf Use rvalue references in rpl next / error. 2017-11-16 07:59:01 +04:00
John Preston
e70052e966 Add piping and on_next, on_error, on_done, start. 2017-11-16 07:59:01 +04:00
John Preston
101fdb1fba Add event_stream for events with many consumers. 2017-11-16 07:59:01 +04:00
John Preston
ebe4bbbf0f Add core rpl::producer/consumer implementation. 2017-11-16 07:59:01 +04:00
visuve
08e3a54a58 Mark missing ctors deleted
- Satisfy the rule of five

Signed-off-by: Veli-Matti Visuri <veli-matti.visuri@cerescon.fi> (github: visuve)
2017-09-28 18:23:42 +03:00
John Preston
7ae1ef0a1a Migrate to VS2017. 2017-09-06 17:11:06 +03:00
John Preston
c76389e126 Allow to use base::lambda independently. 2017-09-03 15:45:49 +03:00
John Preston
df64c972d8 Replace QFlags with base::flags. 2017-09-03 15:45:47 +03:00
John Preston
a1344e862a Add base/flags for bit flags on scoped enums. 2017-09-03 15:45:46 +03:00
John Preston
5faca8d4f6 Add Catch unittest framework and some tests. 2017-09-03 15:45:45 +03:00
John Preston
643bedd4cf Display faved stickers before recently used. 2017-08-30 19:15:48 +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
782114d644 Add and use base::make_weak_unique() helper. 2017-08-30 19:15:28 +03:00
John Preston
f7359093b4 Replace ContactsBox with PeerListBox in two cases.
- View contacts list in PeerListBox.
- Add participants when creating group / channel in PeerListBox.
2017-08-30 19:15:27 +03:00