Feat/loggedout profile#6909
Conversation
| dataSourceFactory.offset = offset | ||
| } | ||
|
|
||
| fun setUserName(userName: String?) { |
There was a problem hiding this comment.
Why is this needed? Could you check if we could leverage sessionManager.userName?
There was a problem hiding this comment.
i initially looked into using that, but it represents the currently logged in user, but here we need the username of the profile being viewed. and those can be different when viewing another user's profile, so i passed the profile username through instead
There was a problem hiding this comment.
We're setting this in the leaderboard fragment and not achievements fragment - is there any specific reason for it?
There was a problem hiding this comment.
We're setting this in the leaderboard fragment and not achievements fragment - is there any specific reason for it?
yes there is a reason for that, the leaderboard flow goes through LeaderboardListViewModel and DataSourceFactory, so the viewed profile username wasn't available in the paging data source unless it was explicitly passed through. but the achievements flow already uses the fragment's userName directly when making the API call, so it didn't require the same change. please correct me if i am wrong :) Thanks
| false | ||
| } else { | ||
| true | ||
| private fun checkAccount(): Boolean { |
There was a problem hiding this comment.
The entire function is a duplicate of what we have in the Achievements fragment, could you please raise a new issue for this?
|
|
|
got it @chrisdebian, i'll update the condition to distinguish between the logged-in user's profile and another user's profile so the login check is only skipped for public profiles |
|
@chrisdebian Made the required changes :) |
|
Nice fix on Looks like |
Fixed it :) |
|
✅ Generated APK variants! |
|
Confirmed — |
|
Thanks @chrisdebian LMK if there are any changes to be made :) |
Description (required)
Fixes #5754
What changes did you make and why?
This changes allows us to viewing another user's profile while logged out by using the profile username instead of the logged-in account when loading leaderboard data. and it also skips the unnecessary login checks for public profiles, preventing the "session expired" prompt and this allows the profile to remain accessible when navigating between the tabs.
Tests performed (required)
Tested Prodebug on Redmi Note 13 Pro with API level 35.
Screenshots (for UI changes only)
Screenrecorder-2026-06-28-11-31-31-52.mp4