-
Notifications
You must be signed in to change notification settings - Fork 487
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(ui): show account name and image on main settings page #1001
Conversation
IndusAryan
commented
Mar 21, 2024
${VideoDownloadManager.downloadProgressEvent.size}") **/ | ||
|
||
// Check login status for each OAuth2API | ||
val accountProfile = accountManagers.firstOrNull { it.loginInfo() != null } |
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.
edge case where you have a login but not pfp
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.
in this case it will load pfp of the local account. and name also ?
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.
no, lets say you have a non null loginInfo, but that loginInfo does not have a pfp then we are fucked
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 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.
assume that accountmanagers is a list of
listof(LoginInfo(
pfp = null,
name = "Hello",
accountIndex = 0
),
LoginInfo(
pfp = null,
name = "World",
accountIndex = 1
))
What would your code do? It would NOT work as it passes the accountProfile check (because it has more than one account), but does not in fact have an image, and because of this val pic = login?.profilePicture ?: continue
will be trigged for both and you will get NOTHING.
app/src/main/java/com/lagradost/cloudstream3/ui/settings/SettingsFragment.kt
Outdated
Show resolved
Hide resolved
I personally think it is better to be safe, and consider there may not be one, amd if there isn't maybe use one of the default avatars from local accounts? If I'm understanding the issue anyway... |
already it loads ?: getdefaultaccount, in worst case it will be empty like it is now |
Don't we already have this since forever? Am I missing something? |
this will show local ac if not using any sync provider |
<stroke | ||
android:width="2dp" | ||
android:color="?attr/white" /> | ||
<corners android:radius="@dimen/rounded_image_radius" /> |
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.
This is wrong, the cardCornerRadius is set to 25dp and while this MIGHT look fine, but rounded_image_radius may be subject to change which makes this a hard to track bug. (Also android on lower vers have difficulties with corners in some edge cases so this must match exactly)