Conversation
Owner
Jiyu13
commented
Aug 13, 2025
- finish adding dataStorage
- add android Access Token Logic With Retrofit OkHttp Interceptors
- maps the JSON field created_at - maps the JSON field item_count
- check if top bar is in ListsScreen - check if goBackIcon is null
- Sets isLoading = true while waiting for the result. - resets isLoading to false
- track isLoading + load lists if isLoading is true
- create SharedUsers model
- center aligned list share row - style list share text
- show original lists if input is empty - if not show lists filtered by input
- keep search input when done is clicked
- can navigate back
- add rightText, right Icon param - check if new params
- add params for top bar
- require userId + request as params - return a ListModel object
- rename file
- user serializable object / data class to define routes
- it represents all the possible states of a login process
- login suspense contains credentials + return a custom wrapper type for either success or failure
- mutable state email and psw + validation and update function - currentUser to hold logged-in user after login - loginState to hold ui state - login function to resets ui state, api call, update state
- install serializable related dependencies
- finish onLoginClick call back - handle login state
- fetch lists with global object currentUser id
- define companion object to manage each preferences key - add methods to save / update data with edit() - define properties to read string type values stored on the device - clear data from dataStore
- provideOkHttpClient to access token on every request + call refresh api to refresh token - wire OkHttpClient into Retrofit provider - provideDataStorageAPI to wire up dataStoreManager - provideListifyAPI created from Retrofit
- suspend fun calls api.login
- Inject AuthUserRepository and ListifyStorageManager via Hilt - Implement login() using Loading/Success/Error LoginState - Persist userId/email/accessToken/refreshToken to DataStore on success
- add errorMessage mutable state - wrap calling repository inside try/finally statement
- show error message if fails to get lists
- getUserId() reads stored userId - isExpired(jwt) decodes the JWT payload (Base64 URL-safe) on-device and checks the exp (epoch seconds) - checkAccessToken() gets /checks the current accessToken + refresh /save new tokens
…oken is valid - navigate to lists screen with user id if both are true - show auth buttons if false
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.