Commit Graph

27134 Commits

Author SHA1 Message Date
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
Jordan Rose
2eff5b187e Re-apply "Merge branch 'jrose/SignalServiceAddress-dedicated-lock'"
This reverts commit 3396e1ceb5.
2022-02-01 17:31:19 -08:00
Jordan Rose
19f9f6b7cd SSK: Limit the per-database-connection cache in app extensions
The default cache size for a SQLite connection is 2000KiB, but our
database pool has several reader connections plus a writer connection.
They can't share a cache because that changes SQLite's locking model,
so the next best thing is to limit their caches individually when
we're in a memory-constrained environment. To avoid the caches getting
*too* small, this also removes one of the available readers outside
the main app.
2022-02-01 16:39:25 -08:00
Jordan Rose
b3ae2d1247 Merge branch 'jrose/less-thread-reindexing' 2022-02-01 15:38:13 -08:00
Jordan Rose
38c024d1b3 Only update group member records when the group model changes 2022-02-01 15:05:34 -08:00
Jordan Rose
61232780ee Don't reindex conversations on every model change
Every single message updates a TSThread model, but only a change in a
member's profile name or phone number, or a change to a group's model,
can update the indexing information. Turn 'shouldBeIndexedForFTS' into
a tri-state 'FTSIndexMode' with options 'never', 'manualUpdates', and
'always', and use 'manualUpdates' for TSThreads. Then explicitly
reindex on any of the changes listed above.
2022-02-01 15:05:34 -08:00
Jordan Rose
be373b7ec6 Update SignalCoreKit again 2022-02-01 14:48:38 -08:00
Jordan Rose
14dab5acae Update SignalCoreKit 2022-02-01 14:48:38 -08:00
Jordan Rose
3396e1ceb5 Revert "Merge branch 'jrose/SignalServiceAddress-dedicated-lock'"
This reverts commit 73882a0e86, reversing
changes made to e6552c79ec.
2022-02-01 14:19:03 -08:00
Jordan Rose
73882a0e86 Merge branch 'jrose/SignalServiceAddress-dedicated-lock' 2022-02-01 11:38:33 -08:00
Jordan Rose
e64094e882 SSK: Manually synchronize updates to SignalServiceAddress properties
Previously this class used AtomicOptional for its properties, a
convenience wrapper we have for protecting a single value with a lock.
This wrapper trades extra heap allocations for simplicity (stepping
around Swift's prohibitions on non-atomically mutating struct
properties or relying on the addresses of object properties). However,
SignalServiceAddresses are created in sufficient numbers to make this
trade-off a problem.

This commit unboxes all of the properties on a SignalServiceAddress
and manually protects them with a shared dedicated UnfairLock.
(AtomicOptional and AtomicValue also use a shared lock, so this is no
less efficient and could actually lead to *less* contention.)
2022-02-01 11:38:21 -08:00
Jordan Rose
c8296d0e90 SSK: Funnel all SignalServiceAddress construction through one init
...including the ones for decoding, which have special, probably
redundant logic to throw away a phone number if the UUID is already
known.
2022-02-01 11:38:21 -08:00
Igor Solomennikov
e6552c79ec Fix UI delay when sending a reply in chat.
The UI updates (including adding a new message to conversation) were
being blocked for 1 second because of the animated dismissal of message
quote panel attached to the input field.
The fix is to block UI updates just for the duration of keyboard animations.
2022-02-01 11:09:09 -08:00