Seems like the new method of saving and reporting updated user info is sending a new account more often than before, so we have to guard against replacing the profile view model while editing.
A large amount of change primarily to the view model layer, to make reasoning about the content reveal/hide state easier.
To prevent terrible scrolling jags while allowing the cells to be shorter when hiding content, the layout changes for content display state now happen before the cell is returned by the datasource provider and the tableview is reloaded when a status’s display mode changes.
Instead of publishing a list of filters, the StatusFilterService now publishes a struct that can apply those filters to any status in any context.
Also, we now use V2 of the filters API, which distinguishes between hide and warn.
Fixes #1354 [BUG] Mastodon iOS App Ignores "Hide completely" Filter action Setting
Filters used to be applied only at the display stage.
There is remaining work here:
- Hide filters still will not hide until we update Filter to use API V2.
- Filter work is now duplicated and should be made more efficient.
- It may be important to hold on to statuses even if they are hidden, so that they can be shown if the filter changes.
Contributes to #1354 [BUG] Mastodon iOS App Ignores "Hide completely" Filter action Setting
This resolves the issue where following people from the “Find people to follow” prompt on first login did not refresh the home timeline view.
Fixes iOS-329
Give full responsibility for API calls to the AuthenticationViewModel.
Give (nearly) full responsibility for UI flow of the signup/log in experience to the WelcomeViewController.
Transition more APIService functions to async await.
Remove unnecessary AppContext vars.
Update helpful text on Log In screen.
Contributes to iOS-321
Files are removed when an app is deleted from device, but the Keychain is not cleared. So now if we find no cached account information upon launch, we remove any accounts remaining in Keychain and the app launches to the Welcome screen.
Fixes iOS-315
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
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
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.