Commit Graph

128 Commits

Author SHA1 Message Date
Morgan Pretty a2f1f36d2c Fixed a number of issues with the Notification Service Extension
Fixed an issue where receiving a PN for outgoing messages could break the NotificationServiceExtension
Fixed an issue where the NotificationServiceExtension could startup in an invalid way resulting in subsequent PNs failing to process
Fixed an issue where you could incorrectly receive multiple generic notifications after receiving an incoming call notification
Fixed an issue where the read state syncing might not clear notifications from the notification center
Fixed an issue with parsing Bencoded data
Updated the PN subscription to subscribe to CONVO_INFO_VOLATILE notifications (update read state)
Updated the NotificationServiceExtension to use standard message processing where possible
Updated the NotificationServiceExtension to update the app badge based on a database query
2023-09-08 11:42:04 +10:00
Morgan Pretty dfdf843f66 Fixed a few more issues
Fixed an issue where tapping a remote notification wasn't opening the conversation
Fixed an issue where the Share Extension could fail due to not having a snode pool loaded
Fixed an issue where the Theme may not be applied at the right time in the Share extension
2023-08-21 16:13:17 +10:00
Morgan Pretty 8e28726fa7 Fixed a bug where unwritable conversations appeared in the share extension 2023-08-17 18:06:06 +10:00
Morgan Pretty 9c9fb09254 Merge remote-tracking branch 'upstream/dev' into feature/blinded-message-request-setting
# Conflicts:
#	SessionMessagingKit/Configuration.swift
2023-08-11 18:29:33 +10:00
Morgan Pretty d863004e6d Added a setting to control community message request polling
Added logic to broadcast the community message request acceptance to SOGS so we can communicate it to message request senders
Fixed an issue where database setting changes wouldn't trigger a live update on a settings screen
Fixed an issue where some setting toggles wouldn't animate the state change
Fixed a rarw force-unwrap crash
2023-08-11 18:02:06 +10:00
Morgan Pretty 5285d81177 Fixed a few more PN logic issues
Sorted out some more threading issues
Removed a redundant SyncPushTokensJob run
Fixed an issue where the NotificationServiceExtension could incorrectly setup the database before setting up it's context
Fixed a few warnings
Removed a bunch of legacy code
Refactored the MainAppContext from Objective C into Swift
2023-08-10 14:43:40 +10:00
Morgan Pretty 18ee9d34fa Merge remote-tracking branch 'upstream/dev' into feature/updated-push-server
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	SessionMessagingKit/Open Groups/Types/SodiumProtocols.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift
#	SessionMessagingKitTests/_TestUtilities/MockAeadXChaCha20Poly1305Ietf.swift
#	SessionUtilitiesKit/JobRunner/JobRunner.swift
2023-08-02 14:35:16 +10:00
Morgan Pretty 66b94778e0 Fixed the build issues and a bug where a new legacy group wasn't subscribile 2023-08-01 16:30:34 +10:00
Morgan Pretty 1b0fda56ad Merge remote-tracking branch 'upstream/dev' into feature/updated-push-server
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Meta/AppDelegate.swift
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/es.lproj/Localizable.strings
#	Session/Meta/Translations/fa.lproj/Localizable.strings
#	Session/Meta/Translations/fi.lproj/Localizable.strings
#	Session/Meta/Translations/fr.lproj/Localizable.strings
#	Session/Meta/Translations/hi.lproj/Localizable.strings
#	Session/Meta/Translations/hr.lproj/Localizable.strings
#	Session/Meta/Translations/id-ID.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt_BR.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/sv.lproj/Localizable.strings
#	Session/Meta/Translations/th.lproj/Localizable.strings
#	Session/Meta/Translations/vi-VN.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Meta/Translations/zh_CN.lproj/Localizable.strings
#	Session/Notifications/SyncPushTokensJob.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ClosedGroups.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift
#	SessionShareExtension/ShareNavController.swift
2023-08-01 16:05:36 +10:00
Morgan Pretty b471a32209 Merge remote-tracking branch 'upstream/dev' into feature/job-runner-unit-tests
# Conflicts:
#	Session/Conversations/ConversationVC+Interaction.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPI.swift
#	SessionMessagingKit/Open Groups/OpenGroupManager.swift
2023-08-01 14:39:00 +10:00
Morgan Pretty a41f1c1366 Fixed the broken tests
Cleaned up the Dependencies so that tests can run synchronously without having to custom set queues as much
Sorted out the crypto and network dependencies to avoid needing weird dependency inheritance
Fixed the flaky tests so they are no longer flaky
Fixed some unexpected JobRunner behaviours
Updated the CI config to use a local build directory for derivedData (now works with build tweaks)
2023-08-01 14:27:41 +10:00
Morgan Pretty f373a989a8 Fixes for user config crashes
Added a method to determine if the database is suspended
Updated the code to show the "Failed" state if sending a message fails due to a suspended database
Prevented a crash which could occur in rare cases when accessing the Seed via the home screen prompt (direct user to share logs with session - db locked or device in an invalid state)
Prevented a crash which could occur when trying to send a message due to failing to retrieve the mnemonic (db locked or device in an invalid state)
Fixed a bug where optimistic messages could end up appearing multiple times
Fixed a crash with the QRCode scanner
Fixed a crash when trying to take a video attachment
Fixed a crash where the image picker grid could go out of bounds when selecting elements
Fixed a crash which could occur when a user provides a recovery password with a word that contains less than 3 characters
Fixed a potential issue where the dependency injection could result in a stale date being used in some places (removing the DI here, proper fix requires larger changes in another branch)
2023-07-20 12:29:56 +10:00
Morgan Pretty e768bebe6d Merge remote-tracking branch 'upstream/dev' into feature/job-runner-unit-tests
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Meta/Session-Prefix.pch
#	Session/Notifications/SyncPushTokensJob.swift
#	Session/Utilities/BackgroundPoller.swift
#	SessionMessagingKit/Configuration.swift
#	SessionMessagingKit/Database/Models/Profile.swift
#	SessionMessagingKit/Jobs/Types/AttachmentDownloadJob.swift
#	SessionMessagingKit/Jobs/Types/AttachmentUploadJob.swift
#	SessionMessagingKit/Jobs/Types/DisappearingMessagesJob.swift
#	SessionMessagingKit/Jobs/Types/FailedAttachmentDownloadsJob.swift
#	SessionMessagingKit/Jobs/Types/FailedMessageSendsJob.swift
#	SessionMessagingKit/Jobs/Types/GroupLeavingJob.swift
#	SessionMessagingKit/Jobs/Types/MessageReceiveJob.swift
#	SessionMessagingKit/Jobs/Types/MessageSendJob.swift
#	SessionMessagingKit/Jobs/Types/NotifyPushServerJob.swift
#	SessionMessagingKit/Jobs/Types/RetrieveDefaultOpenGroupRoomsJob.swift
#	SessionMessagingKit/Jobs/Types/SendReadReceiptsJob.swift
#	SessionMessagingKit/Jobs/Types/UpdateProfilePictureJob.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/ClosedGroupPoller.swift
#	SessionMessagingKit/Utilities/AppReadiness.m
#	SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift
#	SessionMessagingKitTests/_TestUtilities/TestOnionRequestAPI.swift
#	SessionShareExtension/ShareNavController.swift
#	SessionSnodeKit/Jobs/GetSnodePoolJob.swift
#	SessionUtilitiesKit/Configuration.swift
#	SessionUtilitiesKit/Database/Utilities/Database+Utilities.swift
#	SessionUtilitiesKit/JobRunner/JobRunner.swift
#	SignalUtilitiesKit/Meta/SignalUtilitiesKit.h
#	SignalUtilitiesKit/Utilities/SSKAsserts.h
2023-07-18 10:02:51 +10:00
Morgan Pretty ec81236615 Fixed a few more threading-related bugs
Updated the libSession build script to reset and checkout submodules based on a flag (simplify the process)
Updated the share and notification extensions to generate the DSYM on debug builds to allow for better debugging
Added additional startup logging for debugging purposes
Tweaked the SNLog function to indicate when the log happens on the main thread (slightly less efficient but should help track down logic incorrectly running on the main thread)
Fixed a bug where we weren't recording the last PN server registration (so would re-register every time)
Fixed a bug where if the user sent the app to the background too quickly after launching the app wouldn't successfully startup when re-opening
Fixed a bug where the Notification and Share extensions would assert because they were dispatching the post-migration logic to the main thread (due to the threading changes in a previous release)
Fixed a bug where the Notification extension would incorrectly poll open groups on the main thread
2023-06-30 17:59:37 +10:00
Morgan Pretty d0be7f786c Fixed a hang, removed redundant libs, files and code
Fixed an issue where returning the app from the background would result in the app staying permanently on the splash screen
Included a CRC32 implementation so we can drop the CryptoSwift dependenciy (using CryptoKit everywhere else)
Removed 'SocketRocket' (unused)
Removed the `xcode_14_3_workaround` post-install hook (fixed with CocoaPods 1.12.1)
Removed the `enable_fts5_support` post-install hook (enabled by default since GRDB 6.7.0 so redundant)
Removed the `enable_whole_module_optimization_for_crypto_swift` post-install hook (dropped CryptoSwift support)
Cleared out a bunch of headers from the Signal-Bridging-header file (direct imports instead to reduce incremental build sizes)
Deleted some unused code
2023-06-29 16:58:23 +10:00
Morgan Pretty 5e2e103ee1 Resolved the remaining known internal testing issues
Removed the 'immediatelyOnMain' extensions as they would break in some cases (eg. upstream errors with multiple 'receive(on:)' calls) resulting in logic running on unexpected threads
Updated the ReplaySubject to add subscribers in an Atomic just to be safe
Updated the code to remove the invalid open group when the user receives an error after joining
Fixed a bug with editing closed group members
Fixed broken unit tests
2023-06-29 12:11:54 +10:00
Morgan Pretty b6328f79b9 Reworked the app startup process
Shifted the initial HomeVC population to a background thread to avoid blocking launch processing
Added some logging for database 'ABORT' errors to better identify cases of deadlocks
Added a launch timeout modal to allow users to share their logs if the startup process happens to hang
Updated the notification handling (and cancelling) so it could run on background threads (seemed to take up a decent chunk of main thread time)
Fixed an issue where the IP2Country population was running sync which could cause a hang on startup
Fixed an issue where the code checking if the UIPasteBoard contained an image was explicitly advised against by the documentation (caused some reported hangs)
Fixed a hang which could be caused by a redundant function when the ImagePickerController appeared
2023-06-27 18:01:00 +10:00
Morgan Pretty 53a5db0ea5 Fixed a number of issues found during internal testing
Added copy for an unrecoverable startup case
Added some additional logs to better debug ValueObservation query errors
Increased the pageSize to 20 on iPad devices (to prevent it immediately loading a second page)
Cleaned up a bunch of threading logic (try to avoid overriding subscribe/receive threads specified at subscription)
Consolidated the 'sendMessage' and 'sendAttachments' functions
Updated the various frameworks to use 'DAWRF with DSYM' to allow for better debugging during debug mode (at the cost of a longer build time)
Updated the logic to optimistically insert messages when sending to avoid any database write delays
Updated the logic to avoid sending notifications for messages which are already marked as read by the config
Fixed an issue where multiple paths could incorrectly get built at the same time in some cases
Fixed an issue where other job queues could be started before the blockingQueue finishes
Fixed a potential bug with the snode version comparison (was just a string comparison which would fail when getting to double-digit values)
Fixed a bug where you couldn't remove the last reaction on a message
Fixed the broken media message zoom animations
Fixed a bug where the last message read in a conversation wouldn't be correctly detected as already read
Fixed a bug where the QuoteView had no line limits (resulting in the '@You' mention background highlight being incorrectly positioned in the quote preview)
Fixed a bug where a large number of configSyncJobs could be scheduled (only one would run at a time but this could result in performance impacts)
2023-06-23 17:54:29 +10:00
Morgan Pretty 0a638bf37b Fixed the broken JobRunner tests
Cleaned up the 'isRunningTests' logic so it isn't dependant on having an AppContext
2023-06-20 16:33:06 +10:00
Morgan Pretty 5d88db7a8a Merge remote-tracking branch 'origin/feature/tweak-profile-modal-ui' into feature/updated-user-config-handling
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Calls/Call Management/SessionCall.swift
#	Session/Conversations/ConversationVC.swift
#	Session/Conversations/Input View/MentionSelectionView.swift
#	Session/Conversations/Message Cells/VisibleMessageCell.swift
#	Session/Settings/SettingsViewModel.swift
#	Session/Shared/Views/SessionAvatarCell.swift
#	Session/Shared/Views/SessionCell+AccessoryView.swift
#	SessionUIKit/Components/ConfirmationModal.swift
#	SessionUIKit/Components/PlaceholderIcon.swift
#	SignalUtilitiesKit/Profile Pictures/ProfilePictureView.swift
2023-05-26 17:54:45 +10:00
Morgan Pretty 2d792e4e3e Updated the profile picture modal and standardised the ProfilePictureView sizes
Fixed an issue where 'CurrentAppContext().isMainAppAndActive' wasn't called on the main thread
Updated the ProfilePictureView to have the updated icon UI
2023-05-24 13:33:53 +10:00
Morgan Pretty 4330a40f6f Started working on integrating the updated push APIs
Updated the PushNotificationAPI to be more consistent with the SnodeAPI and OpenGroupAPI structures
Updated the logic so if the database key can't be retrieved the app will no longer throw a fatalError (now just fail to initialise Storage and rely on the App/Extensions to properly handle this case)
Fixed a couple of bugs where the share extension wouldn't populate correctly
2023-05-19 17:26:14 +10:00
Morgan Pretty 534343f8b0 Merge remote-tracking branch 'upstream/dev' into feature/updated-user-config-handling
# Conflicts:
#	Session/Closed Groups/NewClosedGroupVC.swift
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Conversations/ConversationVC.swift
#	Session/Conversations/ConversationViewModel.swift
#	Session/Conversations/Settings/ThreadSettingsViewModel.swift
#	Session/Home/GlobalSearch/GlobalSearchViewController.swift
#	Session/Home/HomeVC.swift
#	Session/Home/New Conversation/NewDMVC.swift
#	Session/Media Viewing & Editing/GIFs/GifPickerViewController.swift
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/es.lproj/Localizable.strings
#	Session/Meta/Translations/fa.lproj/Localizable.strings
#	Session/Meta/Translations/fi.lproj/Localizable.strings
#	Session/Meta/Translations/fr.lproj/Localizable.strings
#	Session/Meta/Translations/hi.lproj/Localizable.strings
#	Session/Meta/Translations/hr.lproj/Localizable.strings
#	Session/Meta/Translations/id-ID.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt_BR.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/sv.lproj/Localizable.strings
#	Session/Meta/Translations/th.lproj/Localizable.strings
#	Session/Meta/Translations/vi-VN.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Meta/Translations/zh_CN.lproj/Localizable.strings
#	Session/Settings/BlockedContactsViewController.swift
#	Session/Settings/NukeDataModal.swift
#	Session/Settings/SettingsViewModel.swift
#	SessionMessagingKit/Shared Models/SessionThreadViewModel.swift
#	SessionUIKit/Components/ConfirmationModal.swift
2023-05-18 17:34:25 +10:00
Morgan Pretty 6be759d39c
Merge pull request #851 from mpretty-cyro/feature/updated-profile-picture-modal
Updated the profile picture management UI & functionality
2023-05-18 15:23:11 +10:00
Morgan Pretty 9c8653aa21 Updated the profile picture management UI
Updated the UI to use a modal
Added the ability to remove the profile picture
2023-05-16 13:09:05 +10:00
Morgan Pretty 5b5f4a4e88 Various tweaks and fixes
Fixed an issue where the GlobalSearch push animation could be jittery
Fixed a crash which could occur when returning from the background on certain screens
Removed the keyboard dismiss animation when pushing from global search to a conversation (apparently this is how iMessage avoids the animation bug...)
Updated to the latest version of GRDB
Updated the Atomic wrapper to use the ReadWrite lock for less blocking behaviours
Updated the audio attachment icon to be consistent with Android & Desktop
Updated the QuoteView to omit the "author" if we don't have their name and the quote can't be found
2023-05-16 09:38:14 +10:00
Morgan Pretty 8c8453d922 Updated to the latest libSession, fixed remaining items
Updated to the latest libSession version
Updated the 'hidden' logic to be based on a negative 'priority' value
Added an index on the Quote table to speed up conversation query
Fixed an odd behaviour with GRDB and Combine (simplified the interface as well)
Fixed an issue where migrations could fail
2023-04-14 12:39:18 +10:00
Morgan Pretty 66fd2d4ff8 Finished off a few remaining bits and pieces
Added the 'outdated client' warning banner
Added a unit test to validate the 'group(by:)' method maintains ordering
Added an error when trying to message a non-standard session id directly
Removed the "hide" logic for groups (don't want it)
Removed some unneeded thread fetching
Updated the logic to use the 'lastHash' when fetching config messages
Updated the logic to use the libSession value restrictions instead of hard-coded values
Fixed an issue where members weren't getting removed from legacy groups
2023-03-08 17:27:07 +11:00
Morgan Pretty e28b4b4531 Fixed a number of bugs with the config handling
Added a number of feature flag checks to config updates
Added legacy group disappearing message timer handling
Updated the string linter to clean up the build logs a little
Split the initial config dump generation into it's own migration so it can run the launch after the feature flag is toggled
Fixed a few issues with the initial config dump creation
Fixed an issue where "shadow" conversations would be left in the database by opening a thread and never sending a message
Fixed a bug where duplicate members could be added to legacy groups
Fixed a bug with using animated images for the avatar
Fixed a bug where avatar images which were already on disk could be re-downloaded
2023-03-06 15:20:15 +11:00
Morgan Pretty 8eed08b5b4 Updated to the latest lib, started handling UserGroups
Added unit tests for the UserGroup config type
Updated the logic to use the 'pinnedPriority' and deprecated 'isPinned' (not sorting yet but using the value)
Updated the code to use the libSession community url parsing instead of custom parsing
Fixed an issue where initialising Data with a libSession value wasn't returning null when the data had no actual value
Fixed an issue where the OpenGroupPoller could user an incorrect failure could when handling poll responses
Fixed the UpdateExpiryRequest signature
2023-02-28 17:23:56 +11:00
Morgan Pretty f30b383bb8 Updated to the latest version of libSession-util
Updated the SharedConfigMessage type to have a TTL of 30 days
Updated the SnodeAPI to have a 'poll' method to be more consistent with the OpenGroupAPI (it also does multiple things now so is cleaner)
Added logic to limit the number of config messages to be retrieved per poll
Added the 'ValidatableResponse' protocol to standardise SnodeAPI response validation
Added the libSession version to the logs
Fixed an issue where the user profile pic wouldn't get synced correctly due to memory going out of scope
Fixed some threading issues
Refactored the thread variants to follow the updated terminology (will think about refactoring other code areas later)
Cleaned up the Combine error handling
Started fixing broken unit tests
2023-02-20 12:56:48 +11:00
Morgan Pretty 4f8fb63f2c Merge remote-tracking branch 'upstream/dev' into feature/updated-user-config-handling
# Conflicts:
#	Session/Media Viewing & Editing/PhotoCapture.swift
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/es.lproj/Localizable.strings
#	Session/Meta/Translations/fa.lproj/Localizable.strings
#	Session/Meta/Translations/fi.lproj/Localizable.strings
#	Session/Meta/Translations/fr.lproj/Localizable.strings
#	Session/Meta/Translations/hi.lproj/Localizable.strings
#	Session/Meta/Translations/hr.lproj/Localizable.strings
#	Session/Meta/Translations/id-ID.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt_BR.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/sv.lproj/Localizable.strings
#	Session/Meta/Translations/th.lproj/Localizable.strings
#	Session/Meta/Translations/vi-VN.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Meta/Translations/zh_CN.lproj/Localizable.strings
#	Session/Notifications/AppNotifications.swift
#	Session/Onboarding/RestoreVC.swift
#	Session/Shared/SessionTableViewController.swift
#	Session/Shared/SessionTableViewModel.swift
#	SessionMessagingKit/Calls/WebRTCSession.swift
#	SessionMessagingKit/Database/Models/Attachment.swift
#	SessionMessagingKit/Database/Models/DisappearingMessageConfiguration.swift
#	SessionMessagingKit/File Server/FileServerAPI.swift
#	SessionMessagingKit/Jobs/Types/AttachmentDownloadJob.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPI.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionSnodeKit/OnionRequestAPI.swift
#	SessionSnodeKit/SnodeAPI.swift
#	SessionUtilitiesKit/Database/Models/Identity.swift
#	SessionUtilitiesKit/JobRunner/JobRunner.swift
2023-01-27 14:26:17 +11:00
Morgan Pretty f7199b4c44 Updated the code to take the service node offset into account when setting timestamps 2022-12-21 16:39:52 +11:00
Morgan Pretty 8f3dcbc6be Sorted out a bunch of the config syncing logic
Updated the onboarding to attempt to retrieve the current user profile config and skip display name collection if it already exists
Updated the logic to get the snode pool and build paths immediately on launch even if the user hasn't been created yet (faster onboarding)
Removed the iOS-specific concurrent dual snode '/store' behaviour
Cleaned up the profile updating logic
Fixed an issue where the pollers could end up deadlocking the main thread if too many tried to start concurrently
2022-12-16 16:51:08 +11:00
Morgan Pretty f1e9412c7a Added in missing code changes unrelated to closed groups rebuild 2022-12-08 14:21:38 +11:00
Morgan Pretty 5033738994 Fixed a few issues caused by the PromiseKit refactor
Started cleaning up the TODOs
Fixed a couple of merge conflict issues
Fixed a bug with the state of attachments which failed to download

# Conflicts:
#	SessionMessagingKit/Database/Models/Attachment.swift
2022-12-07 15:59:17 +11:00
Morgan Pretty 6970ff22cc Refactored the remaining references to PromiseKit
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Media Viewing & Editing/PhotoCapture.swift
#	SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender+Convenience.swift
#	SessionMessagingKit/Utilities/Promise+Utilities.swift
#	SessionShareExtension/ShareVC.swift
#	SessionShareExtension/ThreadPickerVC.swift
#	SessionSnodeKit/OnionRequestAPI+Encryption.swift
#	SessionSnodeKit/OnionRequestAPI.swift
#	SessionUtilitiesKit/Database/Storage.swift
#	SessionUtilitiesKit/Networking/HTTP.swift
2022-12-07 15:58:53 +11:00
Morgan Pretty 8b37002d89 Removed some unneeded imports
# Conflicts:
#	SessionMessagingKit/Jobs/Types/AttachmentUploadJob.swift
#	SessionMessagingKit/Jobs/Types/MessageSendJob.swift
#	SessionShareExtension/SAEScreenLockViewController.swift
#	SessionSnodeKit/Models/SnodeBatchRequest.swift
2022-12-07 15:54:56 +11:00
Morgan Pretty c9fdee9f24 Work on the PromiseKit refactor
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Home/Message Requests/MessageRequestsViewModel.swift
#	Session/Notifications/AppNotifications.swift
#	Session/Notifications/PushRegistrationManager.swift
#	Session/Notifications/SyncPushTokensJob.swift
#	Session/Notifications/UserNotificationsAdaptee.swift
#	Session/Settings/BlockedContactsViewModel.swift
#	Session/Settings/NukeDataModal.swift
#	Session/Settings/SettingsViewModel.swift
#	Session/Utilities/BackgroundPoller.swift
#	SessionMessagingKit/Database/Models/ClosedGroup.swift
#	SessionMessagingKit/File Server/FileServerAPI.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPI.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ClosedGroups.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+UnsendRequests.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender+Convenience.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionMessagingKit/Sending & Receiving/Notifications/PushNotificationAPI.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/ClosedGroupPoller.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/CurrentUserPoller.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift
#	SessionMessagingKit/Utilities/ProfileManager.swift
#	SessionSnodeKit/Networking/SnodeAPI.swift
#	SessionSnodeKit/OnionRequestAPI.swift
#	SessionUtilitiesKit/Networking/HTTP.swift
2022-12-07 15:50:58 +11:00
Morgan Pretty 1345e89809 Further config util logic
Removed the usage of the OWSAES256Key (using CryptoKit and raw data instead)
Removed the pre-compiled headers to speed up builds with minor changes (explicit imports instead)

# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	SessionMessagingKit/Database/Models/ClosedGroup.swift
#	SessionMessagingKit/Protos/Generated/SNProto.swift
#	SessionMessagingKit/Protos/Generated/SessionProtos.pb.swift
#	SessionMessagingKit/Protos/SessionProtos.proto
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/CurrentUserPoller.swift
#	SessionMessagingKit/Utilities/ProfileManager.swift
#	SessionSnodeKit/Models/DeleteAllMessagesRequest.swift
#	SessionSnodeKit/Models/GetMessagesRequest.swift
#	SessionSnodeKit/Models/SendMessageRequest.swift
#	SessionSnodeKit/Types/SnodeAPINamespace.swift
2022-12-07 15:06:15 +11:00
Morgan Pretty d8fd3b35b4 Theming tweaks and bug fixes
Made a tweak to prevent some odd looking keyboard transitions when going to conversation settings
Updated the PagedDatabaseObserver to not call 'onChangeUnsorted' on the main thread (now we can generate the changeset on the background thread so there is less main thread work)
Fixed an issue where the most recently received message from the swarm could be removed from the swarm yet the app would still poll for it, resulting in the swarm always returning the oldest possible messages until the user sends a new one-to-one message
Fixed an issue where the initial scroll offset could be incorrect due to certain message types
Fixed an issue where the title view inside a conversation could jump when pushing to the conversation settings screen
Refactored a couple of ObjC functions to Swift as they were crashing (due to memory allocation?) hopefully this will fix it
Tweaked some DispatchQueue priorities to ensure PagedDatabaseObserver loading is prioritised
Updated buttons to use a standard convention for highlighted states
Updated the new conversation button to follow the new highlighted state convention
2022-10-14 17:09:38 +11:00
Morgan Pretty 5a758724b3 Made a few last minute tweaks and fixes
Updated a couple more translations
Updated the copy for the member count in communities
Deleted some more unused code
Fixed up another RTL issue
2022-10-10 16:40:08 +11:00
Morgan Pretty 6eeb0ec7ac Fixed most of the styling issues raised during QA
Copy tweak
Added a toast when copying the sessionId or group URL (fixes to the toast UI as well)
Fixed the new conversation screen styling
Fixed the styling of the various attachment screens
Updated the buttons on the attachment screen to behave like the input view buttons
Removed the old OWSNavigationBar and OWSNavigationController (logic was buggy and not actually needed in most cases)
2022-09-30 18:22:28 +10:00
Morgan Pretty 37124c2185 Updated the alerts to use the custom styled ones
Removed some more unused code
Moved around some files to make them more reusable
2022-09-28 18:26:02 +10:00
Morgan Pretty f98e2a157e Added rounding to the settings and updated the SettingVC to use the config approach
Removed some unused code
2022-09-27 15:36:47 +10:00
Morgan Pretty f7fd15dae0 Finished removing usages to non-theme colour variables
Updated theming throughout
Fixed a couple of bugs with the media gallery
2022-09-20 16:06:01 +10:00
Morgan Pretty 1bc6b0bdba Merge remote-tracking branch 'upstream/dev' into feature/theming
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Conversations/ConversationVC.swift
#	Session/Conversations/ConversationViewModel.swift
#	Session/Conversations/Message Cells/VisibleMessageCell.swift
#	Session/Home/HomeVC.swift
#	Session/Home/Message Requests/MessageRequestsViewController.swift
#	Session/Media Viewing & Editing/MediaTileViewController.swift
#	Session/Meta/AppDelegate.swift
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/es.lproj/Localizable.strings
#	Session/Meta/Translations/fa.lproj/Localizable.strings
#	Session/Meta/Translations/fi.lproj/Localizable.strings
#	Session/Meta/Translations/fr.lproj/Localizable.strings
#	Session/Meta/Translations/hi.lproj/Localizable.strings
#	Session/Meta/Translations/hr.lproj/Localizable.strings
#	Session/Meta/Translations/id-ID.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt_BR.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/sv.lproj/Localizable.strings
#	Session/Meta/Translations/th.lproj/Localizable.strings
#	Session/Meta/Translations/vi-VN.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Meta/Translations/zh_CN.lproj/Localizable.strings
#	Session/Onboarding/LandingVC.swift
#	SessionMessagingKitTests/_TestUtilities/MockGeneralCache.swift
2022-09-15 14:22:11 +10:00
ryanzhao afc862d1c1 resume ans suspend database properly in extensions 2022-09-02 13:43:16 +10:00
Morgan Pretty a1e88329db Merge branch 'dev' into feature/theming
# Conflicts:
#	Podfile.lock
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/Message Cells/VisibleMessageCell.swift
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/es.lproj/Localizable.strings
#	Session/Meta/Translations/fa.lproj/Localizable.strings
#	Session/Meta/Translations/fi.lproj/Localizable.strings
#	Session/Meta/Translations/fr.lproj/Localizable.strings
#	Session/Meta/Translations/hi.lproj/Localizable.strings
#	Session/Meta/Translations/hr.lproj/Localizable.strings
#	Session/Meta/Translations/id-ID.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt_BR.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/sv.lproj/Localizable.strings
#	Session/Meta/Translations/th.lproj/Localizable.strings
#	Session/Meta/Translations/vi-VN.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Meta/Translations/zh_CN.lproj/Localizable.strings
#	Session/Notifications/AppNotifications.swift
#	SessionMessagingKit/Shared Models/MessageViewModel.swift
#	SessionMessagingKit/Shared Models/SessionThreadViewModel.swift
#	SignalUtilitiesKit/Profile Pictures/ProfilePictureView.swift
2022-08-26 13:24:42 +10:00
Morgan Pretty 823006a892 Updated the colours to source from direct theme values (instead of individual)
Removed an unused notification
Refactored the PrivacySettingsViewController
Refactored the ScreenLock code to Swift
Fixed an issue where the match dark/light setting wasn't getting applied on launch
Update the modal styling for the various settings modals
2022-08-24 17:33:10 +10:00