Commit graph

15828 commits

Author SHA1 Message Date
Morgan Pretty
32304ae5dd Cleared out some of the legacy serialisation logic, further UI binding
Refactored the SignalApp class to Swift
Fixed a horizontal alignment issue in the ConversationTitleView
Fixed an issue where expiration timer update messages weren't migrated or rendering correctly
Fixed an issue where expiring messages weren't migrated correctly
Fixed an issue where closed groups which had been left were causing migration failures (due to data incorrectly being assumed to be required)
Shifted the Legacy Attachment types into the 'SMKLegacy' namespace
Moved all of the NSCoding logic for the TSMessage
2022-05-03 17:14:56 +10:00
Morgan Pretty
3baeb981d9 Further work on the JobRunner
Moved the JobRunner into SessionUtilitiesKit so it can be used by SessionSnodeKit
Exposed a 'sharedLokiProject' value on UserDefaults to remove the hard-coded group name used everywhere
Added "blocking" job support for 'OnLaunch' and 'OnActive' jobs to the JobRunner (will retry until it succeeds)
Added the UpdateProfilePicture and RetrieveDefaultOpenGroupRooms jobs
2022-04-27 10:48:54 +10:00
Morgan Pretty
94742c80ec Further work on the JobRunner
Fixed an issue where the hash retrieved when fetching messages from the service node might not be the latest one
Updated the MessageReceiveJob to batch process messages (on failure only the failed messages will retry)
2022-04-26 17:31:50 +10:00
Morgan Pretty
ed9f4ea6c6 Fixed a few closed group and job issues
Fixed a few job migration issues
Fixed an issue with the closed group key pair management (wasn't storing keys correctly)
Refactored the OWSSound (now Preferences.Sound)
Added the logic for the AttachmentDownloadJob and enabled jobs to be cascade deleted via interactions
Optimised the HomeViewModel database observation query (fetch specific columns so changes outside those don't trigger updates)
Updated to the latest GRDB (ran into a deadlock which should be fixed in a newer version)
2022-04-22 18:47:11 +10:00
Morgan Pretty
11231599db Further work on migrations and message pipeline refactoring
Refactored the AppDelegate from Objective C to Swift
Updated the HomeVC to use GRDB
Refactored a number of the Job types to be driven via GRDB and the new JobRunner
Fixed a bug where the LinkPreviewView wouldn't render correctly in dark mode
2022-04-21 16:42:35 +10:00
Morgan Pretty
28553b218b Updated the migration to handle quotes and link previews 2022-04-11 17:30:42 +10:00
Morgan Pretty
4380f1975c Further work on the DB refactoring
Added the rest of the interaction structure to the database (testing some migration logic now - still needs to be finalised)
Updated the YDBToGRDB migrations to wrap their inserts in autorelease pools (helps memory slightly, unfortunately it's caching the YDB data which uses the most memory but we have opted for speed over RAM at the moment)
Updated the MockDataGenerator so it should now "chunk" the code generation (crazy large figures were previously resulting in excessive memory usage)
2022-04-08 16:56:33 +10:00
Morgan Pretty
cf66edb723 Further work on SessionMessagingKit migrations
Added migrations for contacts and started working through thread migration (have contact and closed group threads migrating)
Deprecated usage of ECKeyPair in the migrations (want to be able to remove Curve25519Kit in the future)
2022-04-06 15:43:26 +10:00
Morgan Pretty
0f4df804ed Merge branch 'dev' into feature/database-refactor
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Meta/AppDelegate.m
#	SessionMessagingKit/Utilities/OWSIdentityManager.h
#	SessionMessagingKit/Utilities/OWSIdentityManager.m
#	SignalUtilitiesKit/Database/Storage+Conformances.swift
#	SignalUtilitiesKit/Database/TSStorageHeaders.h
#	SignalUtilitiesKit/To Do/OWSPrimaryStorage+Loki.m
2022-04-04 13:41:16 +10:00
Morgan Pretty
7256cc6871 Merge remote-tracking branch 'upstream/dev' into dev 2022-04-04 13:18:50 +10:00
Morgan Pretty
4ee4b3ffb3 Started adding migration logic for contacts
Updated the getUserHexEncodedPublicKey to take an optional db value so we can retrieve it during the initial migration
2022-04-04 13:18:14 +10:00
RyanZhao
cd3c385444
Merge pull request #610 from mpretty-cyro/feature/remove-unused-code
Remove unused code
2022-04-04 10:48:41 +10:00
Morgan Pretty
72eeb1c796 Updated the Identity type to clear everything instead of just the x25519 pair 2022-04-04 09:58:47 +10:00
Morgan Pretty
410f37f0d5 Updated the SnodeSet table name to match the type
Shifted all GRDB Snode convenience methods to be extensions on Snode (instead of SnodeSet) for consistency
2022-04-04 09:52:48 +10:00
Morgan Pretty
63db2a4e3d Updated the 'SwarmSnode' to use the 'port_https' key instead of the 'port' key (deprecated) 2022-04-04 09:33:12 +10:00
Morgan Pretty
a1b4554cdb Migrated the SessionSnodeKit from YapDatabase to GRDB
Changed the min OS version to iOS 13.0 (support for 'Identifiable')
Removed the alternate approaches to fetching the userKeyPair and userPublicKeyHexString (no consistently routed through the caching method)
Migrated the 'OWSIdentityManager' logic to use the new 'Identity' type
Added the 'Setting' table and got the pattern working fairly nicely (unfortunately there isn't a good way to avoid key collision without proper enums)
Updated the SessionSnodeKit to migration it's data from YDB to GRDB
Updated the SessionSnodeKit to use GRDB throughout it's logic
2022-04-01 17:22:45 +11:00
Morgan Pretty
e65682ae9b Merge branch 'dev' into feature/database-refactor
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Backups/OWSBackup.m
#	Session/Backups/OWSBackupImportJob.m
#	SessionSnodeKit/SnodeAPI.swift
2022-03-31 12:09:04 +11:00
Morgan Pretty
1633105ce2 Merge branch 'dev' into feature/remove-unused-code
# Conflicts:
#	Session/Backups/OWSBackup.m
#	Session/Backups/OWSBackupImportJob.m
#	SignalUtilitiesKit/Sharing/SelectRecipientViewController.m
#	SignalUtilitiesKit/Sharing/SelectThreadViewController.m
2022-03-31 11:51:59 +11:00
Morgan Pretty
459502f1c3 Merge remote-tracking branch 'upstream/dev' into dev 2022-03-31 11:47:52 +11:00
Morgan Pretty
529e416dd1 Started work on GRDB logic and migrations
Setup a migration pattern
Setup the database configuration and security
Started defining the database schema
Started working on the migrations for SessionSnodeKit
2022-03-31 11:47:09 +11:00
RyanZhao
82606a6244
Merge pull request #602 from mpretty-cyro/feature/remove-OWSBlockingManager
Remove the OWSBlockingManager
2022-03-31 10:56:35 +11:00
Morgan Pretty
89e80da625 Removed AppPreferences (unused) 2022-03-30 10:05:47 +11:00
Morgan Pretty
f7091dca28 Removed an empty notification observer 2022-03-30 09:48:34 +11:00
Morgan Pretty
0842dbff1e Removed a bunch of unused code
Removed the legacy Theme code (replaced with SessionUIKit equivalents)
Removed the OWSOrphanDataCleaner (unused)
Removed the OWSReceiptType_Delivery from the OWSOutgoingReceiptManager (unused)
Removed the TSStorageKeys and TSStorageHeaders files (unused)
Removed the LKMessageIDCollection (unused - only had methods for deleting data from the collection)
Removed the OWSPrimaryStorageTrustedKeysCollection and OWSIdentityManager_QueuedVerificationStateSyncMessages (unused)
Removed collections and notifications from OWSProfileManager (unused)
2022-03-30 09:46:08 +11:00
Morgan Pretty
9e3c02f79b Removed the unused legacy OWSBackup code 2022-03-30 09:05:07 +11:00
Morgan Pretty
0e09d4b935 Merge remote-tracking branch 'upstream/dev' into dev 2022-03-30 09:04:12 +11:00
ryanzhao
548aad69a9 update build number 2022-03-29 15:39:09 +11:00
RyanZhao
b281ea528a
Merge pull request #609 from RyanRory/fix-message-requests-reverse
Fix approved chats back to message requests inbox
2022-03-29 15:37:56 +11:00
ryanzhao
801f0d68a8 fix an edge case where a config message might get isApproved set to false 2022-03-29 13:51:34 +11:00
Morgan Pretty
21924ee81a Merge branch 'dev' into feature/remove-OWSBlockingManager
# Conflicts:
#	Session.xcodeproj/project.pbxproj
2022-03-29 08:45:48 +11:00
Morgan Pretty
1b5eea7b4f Merge remote-tracking branch 'upstream/dev' into dev 2022-03-29 08:40:49 +11:00
Ryan Zhao
59f112c55f bump up version & build number 2022-03-28 14:45:50 +11:00
RyanZhao
7cd0079b37
Merge pull request #599 from mpretty-cyro/fix/update-last-message-hash-after-registering-jobs
Fix - Update last message hash after registering jobs
2022-03-28 14:06:03 +11:00
RyanZhao
74f1d9a6d4
Merge pull request #596 from mpretty-cyro/feature/improve-open-group-deletion-processing
Performance: Improve open group deletion processing
2022-03-28 14:05:46 +11:00
RyanZhao
f05c695756
Merge pull request #588 from mpretty-cyro/fix/message-request-count-bug
Performance: Count unread message requests thread-first rather than unread-message-first
2022-03-28 14:00:41 +11:00
Morgan Pretty
7165b9e4f6 Merge branch 'dev' into feature/remove-OWSBlockingManager
# Conflicts:
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Meta/AppDelegate.swift
#	SessionMessagingKit/Messages/Control Messages/ConfigurationMessage+Convenience.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift
2022-03-24 16:51:34 +11:00
Morgan Pretty
2530cb4492 Merge remote-tracking branch 'upstream/dev' into dev 2022-03-24 16:38:36 +11:00
RyanZhao
8daf804fd5
Merge pull request #597 from mpretty-cyro/fix/ui-call-running-on-background-thread
Fix for a UI call running on background thread
2022-03-24 16:36:34 +11:00
RyanZhao
7c18609aa8
Merge pull request #601 from mpretty-cyro/fix/double-url-share
Fix double url share
2022-03-24 16:36:20 +11:00
RyanZhao
3e20519a6a
Merge pull request #603 from mpretty-cyro/fix/link-preview-crash
Fix link preview crash
2022-03-24 16:36:10 +11:00
RyanZhao
0f34972134
Merge pull request #604 from mpretty-cyro/fix/tweaks-to-config-message-generation
Tweaks to config message generation
2022-03-24 16:36:00 +11:00
Morgan Pretty
3663e63bc7 Swapped the Config message 'filter' to a 'compactMap' because apparently that doesn't crash 2022-03-24 16:27:56 +11:00
Morgan Pretty
e4def22472 Moved the Storage.write call into the self.approveMessageRequestIfNeeded call 2022-03-24 15:46:53 +11:00
Morgan Pretty
212c5e87aa Re-added the transaction requirement when generating the current config message 2022-03-24 15:34:46 +11:00
Morgan Pretty
29c53223e0 More tweaks to fix crash
Wrapped the force sync calls within their own Storage.write blocks to ensure they have the latest data and aren't accessing a transaction completed in a different thread
Reverted a number of the unneeded changes
2022-03-24 15:25:47 +11:00
Morgan Pretty
b815a9f348 Fixed up a potential threading issue with the sync configuration logic
Moved all the sync configuration calls to be within the existing 'write' blocks instead of waiting until the completion
2022-03-24 15:08:24 +11:00
Morgan Pretty
1214005c59 Updated the cachedEncodedPublicKey to be Atomic
Added the Atomic wrapper for thread safe variables
2022-03-24 14:42:25 +11:00
Morgan Pretty
1a6c34e3b8 Removed the unused legacy OWSBackup code 2022-03-24 14:35:23 +11:00
Morgan Pretty
f8dfbd4244 Reverting change and fixing a force-cast crash 2022-03-24 14:23:47 +11:00
Morgan Pretty
6205e72eab Change to make the 'getUser(using:)' method more consistent 2022-03-24 14:16:38 +11:00