Commit Graph

996 Commits

Author SHA1 Message Date
Matthew Chen
b18ea23bf2 Respond to CR. 2020-06-23 10:17:15 -03:00
Matthew Chen
6acdeacdb9 Tweak conversation view configuration. 2020-06-23 10:16:38 -03:00
Nora Trapp
086a65ff7c Consolidate conversation scrolling logic 2020-06-19 11:54:31 -07:00
Nora Trapp
8b7772c7b8 Fall forward if there are no messages to fall back to when preserving scroll position 2020-06-18 16:25:04 -07:00
Nora Trapp
6105795cb3 PR Feedback 2020-06-18 16:25:04 -07:00
Nora Trapp
d0534ea642 Preserve conversation scroll position 2020-06-18 16:25:04 -07: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
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
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
Nora Trapp
bebcda4a3c Merge branch 'release/3.10.4' into release/3.11.0 2020-06-08 19:48:36 -07:00
Nora Trapp
9713b65bd6 Fix message request safe area overlap 2020-06-08 19:06:31 -07:00
Matthew Chen
c49a977d3e Merge branch 'release/3.10.3' into release/3.11.0 2020-06-07 15:01:54 -03:00
Nora Trapp
e2e5d3c03b Fix emoji picker behavior when keyboard is visible 2020-06-07 09:33:20 -07:00
Matthew Chen
09ea5e8f1b Label the "slow write transactions" logging with the source of the transaction. 2020-06-07 10:37:55 -03:00
Matthew Chen
ba801f05ce Label the "slow write transactions" logging with the source of the transaction. 2020-06-07 10:37:55 -03:00
Nora Trapp
5036eaf023 A better fix for conversation scroll jumping 2020-06-06 17:11:42 -03:00
Matthew Chen
fd07cfe8a4 Remove old conversation settings views. 2020-06-06 16:16:29 -03:00
Matthew Chen
e2afc6edd8 Remove old conversation settings views. 2020-06-06 16:15:42 -03:00
Nora Trapp
fd2318c3b4 Workaround scroll jump bug 2020-06-01 13:09:36 -07:00
Nora Trapp
12b54a90af Allow reacting with any emoji 2020-06-01 12:52:59 -07:00
Nora Trapp
3d084f958d Mark as unread 2020-05-27 18:29:59 -07:00
Nora Trapp
57a810658a Goodbye iOS 10 2020-05-27 17:34:32 -07:00
Matthew Chen
6b4f192b1b Remove usage of retainUntilComplete. 2020-05-22 09:51:12 -03:00
Matthew Chen
f8b9b209ff Respond to CR. 2020-05-11 10:19:52 -03:00
Matthew Chen
e84168fa68 Merge remote-tracking branch 'private/release/3.8.2' 2020-05-05 13:38:30 -03:00
Matthew Chen
c1c04aae6a Revert "Merge branch 'charlesmchen/viewOnceVsReply' into release/3.8.1"
This reverts commit c70bafa1d9, reversing
changes made to f1d02ed74d.
2020-05-04 22:03:30 -03:00
Matthew Chen
51292d4bdf Merge branch 'release/3.8.1' 2020-04-29 14:40:43 -03:00
Matthew Chen
fc5eb7e380 Disable quoted reply to view-once messages. 2020-04-29 14:09:02 -03:00
Nora Trapp
3698125424 Track reaction read state 2020-04-20 10:25:31 -07:00
Matthew Chen
aa53773e84 Merge branch 'release/3.8.0' 2020-04-15 17:41:19 -03:00
Matthew Chen
a4d802a2a2 Avoid rate limits while doing profile fetches. 2020-04-15 17:03:33 -03:00
Nora Trapp
12f0be1a62 Receive support for delete for everyone 2020-04-13 12:49:27 -07:00
Matthew Chen
3191490149 Fix more build warnings. 2020-04-10 13:17:08 -03:00
Matthew Chen
b42f1968cc Fix build warnings around initializers. 2020-04-08 16:05:54 -03:00
Matthew Chen
8859870af1 Add UI for groups v2 invites. 2020-04-06 11:09:06 -03:00
Matthew Chen
44bb118183 Enable group member actions in conversation view. 2020-04-06 11:01:09 -03:00
Matthew Chen
aee8f18508 Rework conversation settings view.
Add group attributes view controller.
2020-04-02 13:18:55 -03:00
Matthew Chen
94d4ff7dff Convert conversation settings view to Swift. 2020-04-02 13:11:53 -03:00
Nora Trapp
d8e7a79593 Dismiss keyboard when CVC goes inactive 2020-04-01 13:48:00 -07:00
Nora Trapp
b58e5d3945 Extend selected highlight to halfway between message cells 2020-03-23 12:07:39 -07:00
Michael Kirk
f927ef1b4b Batch Select / Delete 2020-03-20 19:36:48 -07:00