The key change here is to store the image subscription in the MediaView’s disposeBag rather than the configuration’s, so that it is properly disposed of in the MediaView’s prepareForReuse().
For good measure, also adding MainActor on prepareForReuse and actual cancellation of all subscriptions before releasing them.
Fixes#1374 [BUG] Posts can load the wrong images
Key points:
- hide image view if there is no image to fetch or if none arrives.
- authorStackView needed to always be full width across the bottom, and needed alignment .fill to avoid having its contents squished to zero height sometimes
- new mainContentStackView seems to need .center alignment when the axis is horizontal in order to size correctly.
Fixes IOS-317
This reverts commit 6035e0e69def1a43207676afebde368a1dfc42e4.
Overriding design principle: Switch tabs only based on user’s direct interaction with the tabs.
Goal: Begin to centralize the locus of view updates for easier bug fixing and future design flexibility.
Remaining: The supplementary views are still heavily using Combine.
Fixes#1372 [BUG] Cannot save new profile fields
Fixes iOS-340
If a view controller is now buried in a navigation stack, its view will have no window to find the correct SceneDelegate with. So look for a navigation controller if the initial look up fails.
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