1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2025-02-03 02:37:37 +01:00

Refetch account info when returning to profile screen

This is almost certainly a duplication of effort when navigating to the profile screen initially, for now, but it means the account details are up to date after you’ve followed/unfollowed, etc, from pages in the same navigation stack.

Fixes IOS-344
This commit is contained in:
shannon 2024-12-11 16:12:34 -05:00
parent 957c1da6d0
commit 51591c9524

View File

@ -163,6 +163,12 @@ class ProfileViewController: UIViewController, MediaPreviewableViewController, A
}.store(in: &subscriptions)
}
override func viewWillAppear(_ animated: Bool) {
Task {
await self.refetchAllData()
}
}
private func updateDisplay(_ viewModel: ProfileViewModelImmutable) {
guard isViewLoaded else { return }
// TODO: careful about resetting things if we failed to push edits