Commit Graph

4554 Commits

Author SHA1 Message Date
Matthew Chen
3cedd3ccdf Overhaul database observation. 2020-06-18 09:28:49 -03:00
Matthew Chen
45ebc16fad Handle 409 "obsolete linked device" errors when linking. 2020-06-18 09:20:45 -03:00
Matthew Chen
6bde41e65f Merge remote-tracking branch 'private/release/3.11.0' 2020-06-18 09:17:19 -03:00
Matthew Chen
d7535fc0a7 Modify group seed behavior for v1 group creation retry. 2020-06-17 15:02:21 -03:00
Nora Trapp
c3238d7351 Merge branch 'release/3.11.0' 2020-06-16 20:48:47 -07:00
Michelle Linington
d164afee1e PR Feedback:
- Adopt dot syntax unless there's a good reason not to
- sortID -> sortId
2020-06-16 15:46:37 -07:00
Michelle Linington
2a73337ff9 IOS-575: Reduce unnecessary updates to lastSortID, unread flag
This change moves -lastVisibleSortID from a property to a method.
Instead of having to explicitly call an update method to recompute the
lastVisibleSortID, we'll just recompute it every time it's invoked.

This is an improvement because:
a. The computation wasn't very expensive
b. We were calling -updateLastVisibleSortID much more frequently than
   how often we actually read it.
c. We had to make sure we aggressively updated the lastVisibleSortID to
   make sure it was up to date when we actually read it.

By moving to something that's recomputed at the time of invocation, we
end up reducing unnecessary work for a more accurate result.

-updateLastVisibleSortId had one side-effect: clearing the unread
message flag. This responsibility is now moved to
-markVisibleMessagesAsRead. This seems to make more sense anyway.

Other changes:
- Adds an explicit clear-only way of updating the unread flag. This is
  only called from one place but it removes logic that might be unclear
  at the call site with a method name that makes more sense.
- Adds some debug assertions to existing code
- Adds a new ivar to track the last sortID reported to
  OWSReadReceiptManager
- Updates -markVisibleMessagesAsRead to adopt this new ivar. Minor
  spacing improvements to this method.
- Renames the method to clear the thread unread flag. This helps to
  differentiate from other similarly named symbols that refer to the
  ConversationViewController's unread flag.
2020-06-16 15:46:37 -07:00
Nora Trapp
e262b45b26 Tune message paging 2020-06-16 12:31:00 -07:00
Nora Trapp
4b77d80256 Remove pinsForEveryone special casing 2020-06-16 12:28:21 -07:00
Nora Trapp
5e5835fc13 Remove expired reactions experience upgrade 2020-06-16 12:28:21 -07:00
Nora Trapp
aab95db806 Strip out message request special casing 2020-06-16 12:28:21 -07:00
Michelle Linington
f6cd6bfb08 Re-adds a useful comment 2020-06-14 19:41:37 -07:00
Michelle Linington
4ae7e68495 PR Feedback: Split out unread tx methods
Instead of implicitly creating an async read tx on a nil parameter, just
have a separate method.
2020-06-12 14:19:08 -07:00
Matthew Chen
aa7dcf2458 Respond to CR. 2020-06-12 13:49:52 -07:00
Nora Trapp
1fb4e1d897 Use sent timestamp for date headers 2020-06-12 13:48:18 -07:00
Nora Trapp
eca9bd0a75 Fix some additional flashing when loading more 2020-06-12 13:42:51 -07:00
Nora Trapp
f26385f065 Apply diffs to conversation view when loading additional messages 2020-06-12 13:42:51 -07:00
Nora Trapp
7aed8a973f Don't load more while decelerating 2020-06-12 13:40:31 -07:00
Michelle Linington
fb3ba5a4e7 IOS-574: Avoid unnecessary database read transactions in -updateLastVisibleSortId
This change improves the performance of unread message tracking and
collocates code that configures the scroll down button

Before, a block was asynced back onto the main queue to take out a read
transaction. This was a fairly hot path, occurring on
-scrollViewDidScroll:, a 100ms timer, etc. This transaction was usually
not useful since unread count updates only occur sparingly.

This change breaks out unread message count updates into a separate
method. When updating lastVisibleSortId, the unread method will only be
called when it appears that we may moving from the unread -> read state.

This adds a couple other minor changes:
- Minor reconfiguring of some properties (e.g. making a property
  readwrite, renaming a getter, etc)
- Leverages a custom setter to automatically reconfigure the
  scrollDownButton on relevant changes
- Moves all repeated view configuration of the scrollDownButton into a
  single method
2020-06-11 22:30:11 -07:00
Matthew Chen
47e5fd48be Add gv2 downgrade checks. 2020-06-11 17:37:23 -07:00
Matthew Chen
577b0acf20 Merge remote-tracking branch 'private/release/3.10.6' into release/3.11.0 2020-06-11 15:33:09 -03:00
Nora Trapp
3e8fa72f7d Insert date headers based on received time not sent time 2020-06-11 13:57:44 -03:00
Matthew Chen
348391670e Fix group access check. 2020-06-11 13:45:45 -03:00
Matthew Chen
0891ce52e1 Copy model read cache values. Add deepCopy method to all models. 2020-06-11 13:22:16 -03:00
Matthew Chen
51f671f1e2 Fix assert in sticker cell layout. 2020-06-11 13:20:29 -03:00
Matthew Chen
77531974d3 Deduplicate thread touches by deferring them until the transaction is finalized. 2020-06-11 13:18:49 -03:00
Matthew Chen
3992df3be2 Improve Debug UI for cloning groups. 2020-06-11 13:11:08 -03:00
Matthew Chen
8a6d8eb6b8 Move writes off of main thread. 2020-06-10 15:52:58 -03:00
Nora Trapp
24af7ab3fe Merge branch 'release/3.10.5' into release/3.11.0 2020-06-09 22:45:56 -07:00
Nora Trapp
6926ae8f56 Fix full screen media view for RTL users 2020-06-09 22:39:44 -07:00
Nora Trapp
923979fed4 Fix new group screen handling of emoji 2020-06-09 22:01:16 -07:00
Nora Trapp
a464273380 Merge branch 'release/3.10.5' into release/3.11.0 2020-06-09 20:15:08 -07:00
Nora Trapp
a0c50308ea Add to group member action 2020-06-09 19:28:35 -07:00
Nora Trapp
497266128e Fix tapping avatar view in RTL layouts 2020-06-09 16:14:10 -07:00
Nora Trapp
5fa4a50c34 Fix avatar taps on media messages 2020-06-09 16:08:58 -07:00
Nora Trapp
acef2210db Blocked above sent 2020-06-09 16:00:03 -07:00
Matthew Chen
7ee81896b6 Merge remote-tracking branch 'private/release/3.10.5' into release/3.11.0 2020-06-09 17:59:37 -03:00
Nora Trapp
effd9de269 Fix a bug where we could inadvertently perform swipe actions on the wrong thread. 2020-06-09 10:35:12 -07:00
Matthew Chen
c715133c3f Cull unsavedOutgoingMessage if message is saved outside load window. 2020-06-09 09:49:21 -03:00
Nora Trapp
bebcda4a3c Merge branch 'release/3.10.4' into release/3.11.0 2020-06-08 19:48:36 -07:00
Nora Trapp
28a17c2c82 Fix verified icon rendering in wrong font 2020-06-08 19:38:15 -07:00
Nora Trapp
bbece528c6 Send our profile key after accepting a message request 2020-06-08 19:06:31 -07:00
Nora Trapp
9713b65bd6 Fix message request safe area overlap 2020-06-08 19:06:31 -07:00
Nora Trapp
cafaa231b3 Use short names for message requests 2020-06-08 19:06:31 -07:00
Matthew Chen
c7f1b83c1c Merge branch 'release/3.10.4' into release/3.11.0 2020-06-08 21:12:54 -03:00
Nora Trapp
29fb38c9ad New permission reminders 2020-06-08 15:28:25 -07:00
Matthew Chen
c9ad295a7c Merge branch 'release/3.10.4' into release/3.11.0 2020-06-08 17:57:13 -03:00
Matthew Chen
2114c98e6f Minor fixes. 2020-06-08 17:28:02 -03:00
Matthew Chen
6628b25542 Throttle message detail view updates. 2020-06-08 12:49:58 -03:00
Matthew Chen
c49a977d3e Merge branch 'release/3.10.3' into release/3.11.0 2020-06-07 15:01:54 -03:00