Commit Graph

57 Commits

Author SHA1 Message Date
Michelle Linington
9ecda7377c Badge asset management 2021-11-09 14:25:42 -08:00
Matthew Chen
5d780d1589 Apply script to normalize includes and imports. 2021-10-21 09:21:10 -03:00
Matthew Chen
498ffd22f2 Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
Michelle Linington
417c135fc9 Lint 2021-10-04 09:53:36 -03:00
Michelle Linington
ccf9383533 Improvements to database swap flow
Added a bunch of comments clarifying the database swap requirements.
Also, removed the baseDir parameter from GRDBDatabaseStorageAdapter.
2021-10-04 09:53:36 -03:00
Michelle Linington
fdc983519a Dynaically update database location at runtime
Fixes an issue where users were no longer receiving messages after
restoration. During restoration, the restoring device copies the
transferred database files to a special "hotswap" directory since we
don't want to overwrite our currently in-use database. Once finished, it
re-opens the database pointing to our hotswap directory. It would then
move the hotswap database to its primary location on the next app
launch.

The problem here is our extensions don't know how to read the hotswap
directory. Even if we added that capability, it's going to be tricky to
coordinate which database they read and when as the main app shuffles
files around.

This fix adjusts our restoration flow. Instead of having a special
"primary" and "hotswap" directory that we need to fix up on the next
launch, we instead record a UserDefaults entry that points to our
current database directory.

Once transfer has completed, the main app only needs to update the
current database directory in UserDefaults. No post-launch swapping
needs to occur.

Extensions will listen for updates to this database location by
registering KVO on NSUserDefaults.

This change also adjusts the restoration flow to break it up into
discrete stages. The motivation here is we need to make sure that a
partial restoration doesn't put the extensions in an inconsistent state.
2021-10-04 09:53:35 -03:00
Michelle Linington
8de3b76ee9 There are two types of File Not Found errors we can ignore 2021-08-27 14:26:10 -07:00
Matthew Chen
5348c1a8c7 Clean up remote config and feature flags. 2021-08-24 20:39:26 -03:00
Matthew Chen
3485c230bd Revise app versioning scheme. 2021-08-23 18:23:50 -03:00
Matthew Chen
93d9c15073 Revise app versioning scheme. 2021-08-23 18:23:49 -03:00
Nora Trapp
858b87ac51 Restrict various AppReadiness blocks to main app only 2021-06-24 12:20:46 -07:00
Nora Trapp
a978e453bc Preserve voice message drafts 2021-05-05 15:25:54 -03:00
Nora Trapp
0ef7fc24e6 Revert database recovery attempts, just flag when we detect corruption and prevent app launch. 2021-04-01 12:50:41 -07:00
Nora Trapp
722675525d Change device transfer hotswap to avoid database corruption. 2021-04-01 12:50:41 -07:00
Nora Trapp
db5532b590 protect database recovery from orphan data cleaner 2021-04-01 12:50:41 -07:00
Matthew Chen
6b2e8dc359 Respond to CR. 2021-03-25 14:32:53 -03:00
Matthew Chen
86b8eb08b8 Remove YapDatabase.
Apply asset from design.

Fix rebase breakage.
2021-03-25 11:41:16 -03:00
Matthew Chen
0ff23b8f21 Clean up app readiness. 2021-03-25 10:52:31 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
ad6bda8a44 Rename singleton accessors. 2020-09-17 21:11:07 -03:00
Matthew Chen
b6ace5a3f6 Fix bug in link preview view measurement. 2020-09-08 17:54:43 -03:00
Nora Trapp
136dcfb6d7 Add mentions to orphan data cleaner 2020-08-04 14:08:29 -07:00
Matthew Chen
ba801f05ce Label the "slow write transactions" logging with the source of the transaction. 2020-06-07 10:37:55 -03:00
Matthew Chen
ab5c781723 Respond to CR. 2020-05-11 11:46:08 -03:00
Michael Kirk
07ccc40cd6 extract DebugFlags from FeatureFlags 2020-02-12 15:19:55 -07:00
Matthew Chen
1ed5141de6 Address perf hotspot in orphan data cleaner around reactions. 2020-01-27 17:21:52 -03:00
Matthew Chen
a85ef8b402 Allow parallel usage of staging and production services. 2020-01-15 10:48:43 -03:00
Matthew Chen
e88df8a8cf Allow parallel usage of staging and production services. 2020-01-15 10:48:42 -03:00
Nora Trapp
1f78ae5bb0 Reaction cleanup 2019-11-14 13:24:55 -08:00
Michael Kirk
a108c854a2 save sync job record attachments from orphan data cleaner 2019-11-04 14:06:54 -08:00
Matthew Chen
6743b73c79 Protect audio waveform files from orphan data cleaner. 2019-09-24 17:18:23 -03:00
Matthew Chen
6714932fca Add suppressBackgroundActivity feature flag. 2019-09-23 13:49:59 -03:00
Matthew Chen
19f2be0e12 Fix build break. 2019-09-23 12:37:13 -03:00
Matthew Chen
d80a8b73d2 Improve logging around database file protection. 2019-09-23 12:25:24 -03:00
Matthew Chen
da6ade366f Protect databases from orphan clean up. 2019-09-23 12:24:13 -03:00
Matthew Chen
8e4cd299be Merge tag '2.43.0.17' 2019-09-23 12:19:18 -03:00
Matthew Chen
f3d252e5d5 Improve logging around missing or corrupt images. 2019-09-20 21:17:20 -03:00
Matthew Chen
0389cdb730 Respond to CR. 2019-09-16 13:01:37 -03:00
Matthew Chen
9dea6069e4 Batched and unbatched enumerations. 2019-09-16 13:01:36 -03:00
Matthew Chen
5dc6cf5f8b Fix bug in orphan data cleaner. 2019-09-13 16:16:18 -07:00
Matthew Chen
c067858d1b Fix bug in orphan data cleaner. 2019-09-13 16:13:28 -07:00
Matthew Chen
dd770f9f2d Use separate keyspec for GRDB. 2019-08-23 15:34:53 -03:00
Michael Kirk
926e76270f Merge tag '2.42.0.8' 2019-08-20 09:52:18 -06:00
Michael Kirk
c0c81b5e53 fix errant deletion of non-orphaned profile avatars 2019-08-19 12:52:42 -06:00
Matthew Chen
85756b0fe9 Merge remote-tracking branch 'private/release/2.42.0' 2019-08-16 13:21:38 -03:00
Matthew Chen
60d07dd4d7 Clean up ahead of PR. 2019-08-15 16:10:14 -03:00
Matthew Chen
d308c566af Address deadlocks in profile manager. 2019-08-15 16:10:14 -03:00
Matthew Chen
c4c054b4ca Fix spurious assert in orphan data cleaner. 2019-08-15 14:26:57 -03:00
Michael Kirk
34ba50bd02 broadcast media operation
Only upload once when sending to multiple via the camera first flow
2019-08-15 09:36:57 -06:00
Michael Kirk
4dc75aed3d fix warnings 2019-08-09 09:41:59 -06:00