-
Notifications
You must be signed in to change notification settings - Fork 551
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
feat: Fetch settings and divide events view model #2104
Conversation
app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt
Outdated
Show resolved
Hide resolved
Updated |
} | ||
}) | ||
|
||
attendeeViewModel.getSettings() |
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.
There is no guarantee that settings have been fetched till the next statement is executed
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.
Then onErrorResumeNext will execute and settings will fetch from api.
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.
Still there is no guarantee that settings have been fetched till the next statement is executed, as getSettings is asynchronous
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.
Sorry, I don't understand which next statement. During fetching/getting settings progress dialog is displaying and if settings fetch successfully or there is an error(=15), value for mutableOrderExpiryTime is set and only then countdown timer will start.
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.
The statement which is immediately proceeding getSettings
app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewModel.kt
Outdated
Show resolved
Hide resolved
Updated |
Approving but there is a need of polishing |
Fixes #2101
Fixes #2083