-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't persist following #1136
Don't persist following #1136
Conversation
also: Refactor Button-Background-Stuff
automatic conformance FTW!
This is preparation, but as you know: Proper Preperation and Planning Prevent Piss Poor Performance
This is a first step, for now we show the name to see if it works (and it does!), the other properties and functionality will follow. Again, this includes some refactoring, like getting rid of Configuration
cause I'm lazy
Bridge account to user as long as Profile-screen doesn't work with Mastodon.Entity.Account, but MastodonUser
For whatever reason, fetchUser and accountInfo returned different results for me (something something ID), that's why I replaced accountInfo which came from #1053 with fetchUser, so the displayed profile is consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When trying to view the followers of any account in my timeline, I'm only seeing an infinite spinner but no results. Looking at my own followers (Account Tab) works.
This might be related to the fact that, we're not showing following people which are on another server than the currently logged in instance. (In the current prod version I'm seeing the message in the screenshot instead).
Also I'm seeing lots of JSON decoding errors when going back to my Timeline (Mastodon Server v4.2.1):
Swift.DecodingError.keyNotFound(CodingKeys(stringValue: "id", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"id\", intValue: nil) (\"id\").", underlyingError: nil))
and
Swift.DecodingError.typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array<Any> but found a dictionary instead.", underlyingError: nil))
I've used MBProgressHUD in the past as well but I'm not a huge fan of pulling in a dependency which hasn't been updated in years, but also I totally feel the pain of not wanting to write an indicator from scratch. @zeitschlag what do you think of creating a light-weight wrapper around UIAlertController to server as a modal loading indicator? |
@kimar Thank you for your review :) Regarding
We can still replace it with something better/nicer/... at any time, I'd have nothing against it and I'd encourage you (or everybody else reading this) to suggest/build something better/nicer/... :) |
…implementation No more recursion due to no timer and better state handling
Regarding the The reason for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM 🚀 Looks solid to me now.
tl;dr: Don't use
MastodonUser
on "Following"-screen, butMastodon.Entity.Account
This PR does several things:
Loading
-state of theFollowButton
inUserView
FollowButton
uses configuration now (which makes showing an ActivityIndicator very easy). Oh, theFollowButton
is gone and got replaced by a basicUIButton
.