Commit Graph

27146 Commits

Author SHA1 Message Date
Jordan Rose
bb0593fd62 Groups updates: adopt maxSupportedChangeEpoch and includeFirstState
The scaffolding for this has been there for a long time, but the
server side has only just been hooked up. This should save a lot of
traffic when processing a long group backlog, or a backlog for a large
group.
2022-02-08 15:06:24 -08:00
Jordan Rose
8f426a5700 Merge branch 'jrose/snapshot-only-change' 2022-02-08 15:05:48 -08:00
Jordan Rose
3873741dad Handle a group "change" that has only a snapshot (no actions)
The server will include this if the backlog of group updates *should*
have brought the group up to date, but the actual change action for
the latest revision is missing. This should never happen under normal
operation, but it's best to be defensive against data loss. (Or in
this case, new server features tested in upcoming commits.)
2022-02-08 14:24:05 -08:00
Michelle Linington
473d5c2baf Merge branch 'mlin/PR/IOS-2104' 2022-02-08 14:19:45 -08:00
Michelle Linington
52092e0e2a Lint 2022-02-08 14:19:26 -08:00
Michelle Linington
9c1ecd8b50 IOS-2104: Unable to download voice message
Fixes a couple issues with voice messages:
- Tap actions will now check to the attachment download state and
  perform an appropriate action. Downloaded messages play, downloading
  messages are cancelled, undownloaded messages are enqueued for
  download.
- Improved implementation of AudioAttachment equatability. Cells will
  now redraw when download state changes.
2022-02-08 14:19:26 -08:00
Michelle Linington
d5485ed3ca Merge branch 'mlin/PR/FixChangePhoneNumberIcon' 2022-02-08 12:30:05 -08:00
Michelle Linington
827cc5de73 Fix change phone number icon 2022-02-08 12:29:42 -08:00
Nora Trapp
760189016a "Bump build to 5.28.0.24." (nightly-02-08-2022) 2022-02-08 04:01:00 -08:00
Nora Trapp
35a65a5fab "Bump build to 5.28.0.23." (nightly-02-07-2022) 2022-02-07 04:00:57 -08:00
Nora Trapp
ca0d6f757f "Bump build to 5.28.0.22." (nightly-02-06-2022) 2022-02-06 04:00:53 -08:00
Nora Trapp
3ff83d18bd "Bump build to 5.28.0.21." (nightly-02-05-2022) 2022-02-05 04:01:12 -08:00
Nora Trapp
facdd7e7ba "Feature flags for .qa." 2022-02-05 04:01:12 -08:00
Michelle Linington
d1d3709f24 Merge branch 'ringrtc/v2.18.1' 2022-02-04 14:18:07 -08:00
Jim Gustafson
8040fe640c Update to RingRTC v2.18.1 2022-02-04 14:15:12 -08:00
Nora Trapp
4b9890f4fe Merge branch 'release/5.27.1' 2022-02-04 13:37:18 -08:00
Nora Trapp
d03945802b "Bump build to 5.27.1.0." 2022-02-04 13:34:54 -08:00
Nora Trapp
e3412cb2bf "Feature flags for .production." 2022-02-04 13:34:46 -08:00
Nora Trapp
575ee9960d Allow bypassing PIN creation during onboarding when network issues are encountered 2022-02-04 13:34:01 -08:00
Michelle Linington
7fb11f5036 "Bump build to 5.28.0.20." (Internal) 2022-02-04 13:05:42 -08:00
George Nachman
8502cbe26b Merge branch 'george/PR/profile-changed-optimization' into master 2022-02-04 11:34:36 -08:00
George Nachman
149f8b0858 Avoid reindexing on profile update.
When we get a new profile with a given name or
family name, it usually doesn't change. Prior to
this commit, we would reindex regardless so long
as at least one of the names was nonnil. This
commit reindexes only if the names have actually
changed.
2022-02-04 11:32:41 -08:00
Jordan Rose
feab625abf Merge branch 'jrose/drainNextBatch' 2022-02-04 11:29:50 -08:00
Jordan Rose
75b585cd87 SSK: Turn recursion to iteration for MessageProcessor.drainNextBatch() 2022-02-04 11:02:11 -08:00
George Nachman
9100311ec3 Merge branch 'george/PR/ensure-banners-twice' into master 2022-02-04 10:53:45 -08:00
George Nachman
6383f4f96f Avoid calling ensureBannerState twice.
When you open a chat if there is no inputToolbar
then applyTheme() will call ensureBannerState().

Unfortunately, ensureBannerState() is very slow
because of group name collision finding. This
commit avoids doing the search twice in this case.

I considered changing ConverationViewController so
that it will not duplicate the effort of
GroupMembershipNameCollisionFinder when nothing
has changed. I still want to do that, but it's a
much larger task.

Impact: This reduces database queries when opening
the MobileCoin group from 11,216 to 6,669—a 40%
reduction!
2022-02-04 10:52:15 -08:00
Martin Böttcher
0d1ede1b56
minor UI tweaks (#3975) 2022-02-04 19:34:05 +01:00
Jordan Rose
2e660f3aa6 Merge branch 'jrose/simplify-promise-chain' 2022-02-04 10:20:04 -08:00
Jordan Rose
56701f7c11 Prefer recover to catch and explicit future.reject(error)
Collapses a nested promise structure to a top-level one without
changing functionality.
2022-02-04 09:32:01 -08:00
Nora Trapp
e90e802774 "Bump build to 5.28.0.19." (nightly-02-04-2022) 2022-02-04 04:00:58 -08:00
Michelle Linington
cff6ea4f04 "Bump build to 5.28.0.18." (Internal) 2022-02-03 18:18:41 -08:00
Michelle Linington
11f028ec7a "Feature flags for .qa." 2022-02-03 18:18:38 -08:00
Michelle Linington
c77939a907 "Bump build to 5.28.0.17." (Beta) 2022-02-03 18:18:32 -08:00
Michelle Linington
45e11a99eb "Feature flags for .beta." 2022-02-03 18:18:28 -08:00
Nora Trapp
afc97cd36c Fix version discrepancy with ASC 2022-02-03 13:19:07 -08:00
Nora Trapp
43825b90f1 Update to SignalClient 0.12.2 2022-02-03 13:15:40 -08:00
Martin Böttcher
69691b4ba6
fixed broken vertical position of context menu (#3970)
* fixed broken vertical position of context menu
2022-02-03 19:30:06 +01:00
Jordan Rose
176fd82176 Put an autoreleasepool around indexing each contact in a group
In a large group, this can build up to a substantial amount of work.
2022-02-03 09:47:04 -08:00
Jordan Rose
310638ad78 Fix MessageProcessingIntegrationTest database expectations
These tests fulfill an expectation when a write to the database causes
the desired state to be reached. However, there may still be writes to
the database in flight, and the *next* write will *also* probably be
in the desired state, resulting in the expectation being fulfilled
again. Because this happened *after* the test finished, an exception
was thrown, the test environment terminated, and the *next* test (or
possibly a later one) was being blamed for the failure.

Fix this issue in both places where it happens by allowing multiple
fulfills, and re-enable the test that was previously getting blamed
for this.
2022-02-03 09:44:11 -08:00
Martin Böttcher
eeb31f378a
fixed two finger multi selection gesture (#3969) 2022-02-03 18:07:32 +01:00
Nora Trapp
ccf1856da8 "Bump build to 5.28.0.15." (nightly-02-03-2022) 2022-02-03 04:00:45 -08:00
Michelle Linington
629e3795fa "Bump build to 5.28.0.14." (Internal) 2022-02-02 16:51:31 -08:00
Jordan Rose
4f4a3f2e17 Merge branch 'jrose/upload-build-logs-on-failure' 2022-02-02 16:47:26 -08:00
Jordan Rose
5a050b914c CI: Upload build logs on failure 2022-02-02 16:06:38 -08:00
George Nachman
5b2971e79e Merge branch 'george/PR/larger-sticker-cache' into master 2022-02-02 13:07:39 -08:00
George Nachman
07d3ce2dec Increase the size of the sticker LRU cache.
We ship with 49 stickers and the previous cache size of 32 led to
thrasing every time a chat was opened.

Since sticker packs can be as large as 200 stickers and we hold three
pages in cache while the keyboard is open, increase the cache size for
the main app to 600. For the share extension, make it 64 to minimize
memory use while avoiding threashing.

The cost of this cache is just the sticker metadata (unique ID, emoji
description, etc.) so it won't make much difference in memory
utilization.
2022-02-02 13:07:01 -08:00
George Nachman
520da1e000 Merge branch 'george/PR/compare-profiles' into master 2022-02-02 09:46:15 -08:00
George Nachman
0d09397e36 Don't fetch & compare badges: badge ID is enough. 2022-02-02 09:45:30 -08:00
George Nachman
d9947bdd33 Fix diffing profiles.
When profile updates are applied, we diff them to
avoid redundant saves and the resulting work (like
reloading all cells of the conversation).

The diff often failed spuriously because
OWSUserProfileBadgeInfo did not implement
`isEqual:` and instead relied on `NSObject`'s
default implementation using pointer equality.

This commit makes two changes:

1. Implement `-[OWSUserProfileBadgeInfo isEqual:]`
2. Force the ProfileBadge to be loaded prior to
   comparing snapshots so the comparison will be
   correct.

This significantly reduces the number of database
calls when opening a large chat. It may possibly
increase the amount of DB work needed for smaller
groups by loading the profile badge earlier.
2022-02-02 09:45:30 -08:00
Nora Trapp
3fee1e3913 "Bump build to 5.28.0.13." (nightly-02-02-2022) 2022-02-02 04:00:41 -08:00