Skip to content

Commit

Permalink
Refetch account info when returning to profile screen
Browse files Browse the repository at this point in the history
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
  • Loading branch information
whattherestimefor committed Dec 11, 2024
1 parent 957c1da commit 51591c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Mastodon/Scene/Profile/ProfileViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 51591c9

Please sign in to comment.