-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix for discussion pull to refresh #393
fix for discussion pull to refresh #393
Conversation
…-when-refresh chore: get data from API when refresh
@@ -88,19 +90,23 @@ public class ResponsesViewModel: BaseResponsesViewModel, ObservableObject { | |||
} | |||
|
|||
@MainActor | |||
func getComments(commentID: String, parentComment: Post, page: Int) async -> Bool { | |||
func getResponsesData(commentID: String, parentComment: Post, page: Int, refresh: Bool = false) async -> Bool { |
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.
You have renamed the getComments
to getResponsesData
but there are other elements which are according to the old method name like self.comments
. Do we need to update them as well to it's ok to just update the method name?
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.
I renamed it to getResponsesData
because now we get not only the comments
here, but also the parent post data
- so now it doesn't just work with comments but with several data types.
@rnr The code is not compiling at my end and I am getting the following errors. I've tried by cleaning and even by deleting the derived data. |
This PR fixes issue #358 when after pull-to-refresh user sees 'old' data.
Added actual data retrieval for "parent message" in Thread and Responses Views
Issue recording:
Exported.MPEG-4.movie3.mp4