Commit Graph

6881 Commits

Author SHA1 Message Date
shannon 299e4f2cdf Cache updated account
contributes to iOS-319
2024-11-19 12:10:56 -05:00
shannon 7b0fe1a70b Ensure that currentActiveUser is updated by the time activateUser() returns.
contributes to iOS-319
2024-11-19 12:10:48 -05:00
shannon 082f5e6ce3 Fully initialize AuthenticationServiceProvider from within init
contributes to iOS-319
2024-11-19 12:10:38 -05:00
shannon d96be97cf6 Only publish new active user if it has changed, and only fetch info for current user.
contributes to iOS-319
2024-11-19 12:10:30 -05:00
shannon 96e3bec016 Save account information after successful updateCredentials
This used to be handled at one callsite.

contributes to iOS-319
2024-11-19 12:10:14 -05:00
shannon ae7aaf091d Only refetch information about the active user’s instance, not all of them.
contributes to iOS-319
2024-11-19 12:10:03 -05:00
shannon 54d04aed4e Continue to make MastodonAuthenticationBox the standard form of passing user information
Further simplify the AuthenticationViewModel and the public interface of AuthenticationServiceProvider.

Publish currentActiveUser from AuthenticationServiceProvider instead of assuming all callers know to take the first in the list as the active one.

contributes to iOS-319
2024-11-19 12:09:55 -05:00
shannon 410a34ad1b End the authentication publishing stream when done.
contributes to iOS-319
2024-11-19 12:09:44 -05:00
shannon 6af4c528e4 Preparing to move authentication caching responsibility
contributes to iOS-319
2024-11-19 12:09:35 -05:00
shannon 1e472c8232 Some simplification to login
Creating async await alternatives to Combine publishers in cases where that makes sense.

Near term goal is to centralize responsibility for caching of user info.

contributes to iOS-319
2024-11-19 12:09:27 -05:00
shannon 8ee189e3cf Remove redundant function
contributes to iOS-319
2024-11-19 12:09:14 -05:00
shannon 40ec6e94b2 Move a very specific extension to the one file that uses it
contributes to iOS-319
2024-11-19 12:09:05 -05:00
shannon 2c1e0a6eb9 Update build settings
contributes to iOS-319
2024-11-19 12:08:33 -05:00
shannon 9ed9c79f25 Begin moving filesystem cache responsibility into PersistenceManager
contributes to iOS-319
2024-11-19 12:08:22 -05:00
shannon 11c0deff2d Move PersistenceManager to its own file
contributes to iOS-319
2024-11-19 12:08:12 -05:00
whattherestimefor 255130facc
Update build-only.yml
Use macos-15
2024-11-18 10:01:55 -05:00
shannon 138230e936 Fix build error 2024-11-15 14:55:15 -05:00
shannon 08b47dde37 Make coreDataStack private 2024-11-15 14:51:22 -05:00
shannon d7f473c892 MainActor for the new PersistenceManager 2024-11-15 14:45:37 -05:00
shannon d1ac4e8796 Fix build error 2024-11-15 14:33:31 -05:00
shannon 9380ef3361 Remove unused additionalPredicate 2024-11-15 14:32:47 -05:00
shannon 35f1280904 Make view models @MainActor 2024-11-15 14:15:01 -05:00
shannon c4442fe8a9 Fix crash on launch due to infinite loop
And more honestly about singletons.
2024-11-15 12:25:58 -05:00
shannon 77f3c5a64d Combine AuthenticationService into AuthenticationServiceProvider
Also, AppContext, APIService, and AuthenticationServiceProvider are now more obviously singletons.

And AuthenticationServiceProvider can now be asked for the current active user, instead of every caller assuming the first element of a list of users is the active user.
2024-11-14 16:30:51 -05:00
shannon 5dcc64b094 Simplify MasotodonAuthenticationBox 2024-11-14 11:17:22 -05:00
shannon cf9b947d94 Enforce immutability of MastodonAuthentication 2024-11-14 10:20:25 -05:00
shannon 4737d59b9f Remove unused code 2024-11-14 10:03:59 -05:00
shannon 04108fd0e4 Remove AuthContext
MastodonAuthenticationBox, which already wraps the MastodonAuthentication, is now used directly.
2024-11-14 09:49:19 -05:00
whattherestimefor 4acb163074
Update to run on macos-15
GitHub no longer offers Xcode 16 on macos-14. https://github.com/actions/runner-images/issues/10703
2024-11-13 09:39:22 -05:00
shannon 16f7a86374 Fix concurrency error
Future work: Make MastodonAuthentication immutable and Sendable.
2024-11-13 09:21:28 -05:00
shannon 75d80ff382 bundler version update 2024-11-13 09:19:59 -05:00
shannon 60f7f91114 Update accountCreatedAt date if missing
Contributes to iOS-252
2024-11-12 15:54:11 -05:00
shannon b1a4571c53 Fixes #687 [BUG] Sign Out from the app does not forget the user's authorization
Use an ephemeral session when authenticating user.

Contributes to iOS-315
2024-11-12 15:24:19 -05:00
shannon 93b8069ded Properly format TODO 2024-11-12 13:00:42 -05:00
shannon e8ab6753d2 Add MainActor to AboutInstanceViewControllerDelegate 2024-11-12 13:00:28 -05:00
shannon 9257477f92 Deleting unused code 2024-11-11 14:31:50 -05:00
shannon c6df2b0651 Fixes filtered posts take up too much space (#441)
Use content warning UI for filtered posts, and restrict height of CW area in all cases.
2024-11-08 15:07:54 -05:00
shannon 76498442e3 Fix for logged in user requiring reauthorization.
Related to iOS-252
2024-11-07 15:37:18 -05:00
shannon 280df2ae39 Always use vertical layout for edit history (iOS-383)
Quick fix for layout of languages with lengthier strings.
2024-11-07 15:37:18 -05:00
shannon 28f1743ebf Fix truncated message text in some situations
Reduce stack view spacing and allow font to scale down.
Related to iOS-252
2024-11-07 15:37:17 -05:00
shannon 531c1a054e Fix issue where app sometimes launches to login screen even though you are already logged in. 2024-11-07 08:56:03 -05:00
whattherestimefor 9d774cb541
Add ability to donate to Mastodon from the app (#1353)
This change only affects users logged in to mastodon.social or mastodon.online. A banner may be periodically displayed at the bottom of the homescreen encouraging donations and menu options are now available in Settings to make new donations or manage existing ones.

Amounts will not necessarily be returned from the server in order. The first amount returned is taken as the default and the amounts are sorted before display.

---------

Co-authored-by: Marcus Kida <marcus.kida@bearologics.com>
2024-11-06 19:37:52 -05:00
shannon fdca50179e Wait for authentications to be available before trying to use them.
The prior fix for memory corruption problems in authentications had caused the app to launch to the new user screen every time.
2024-10-30 14:41:48 -04:00
shannon 20f7d761bd Increasing thread safety for authentications.
Attempting to fix multiple crashes associated with the call to persist() triggered by the authentications setter called in restore().
2024-10-30 14:41:48 -04:00
shannon a9e088a9c7 update version number 2024-10-23 11:23:51 -04:00
shannon 583c796a4c Some defense against ProfileViewController.authContext.getter Forced Unwrapping Crash
Make the viewModel of the ProfileViewController optional rather than force unwrapping it. If the necessary information is not available, Profile page should show blank rather than crashing, and hopefully will have the expected info soon or the next time it is opened.

There is still a crash danger inherent in the use of TabBarPager, which requires a non-optional for several protocol methods were we can’t guarantee to have one to return. This dependency should be removed in the future.
2024-10-23 10:29:50 -04:00
shannon bec6a3bce7 update Ruby version to 3.3.5 2024-10-22 11:23:04 -04:00
Marcus Kida 382098ed34
Use MetaTextKit fork 2024-10-09 19:29:55 +02:00
Marcus Kida 7e28e3ce06
Revert "Set SWIFT_ENABLE_OPAQUE_TYPE_ERASURE=NO"
This reverts commit d7e983a217.
2024-10-09 12:11:55 +02:00
Marcus Kida 905cb46678
Reapply "Switch to Xcode 16 on macOS 14 arm64 GHA Runner"
This reverts commit 79643d411f.
2024-10-09 12:11:30 +02:00