-
Notifications
You must be signed in to change notification settings - Fork 71
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] keep track of previously logged out users #2906
Conversation
* show logged out users in account bottom sheet to prefill the username when login
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.
left some review comments, functionality wise, seems good.
@@ -55,7 +80,7 @@ const AccountsBottomSheet = forwardRef( | |||
onClose={onClose} | |||
> | |||
<FlatList | |||
data={accounts} | |||
data={[...accounts, ...prevLoggedInUsers]} |
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.
to keep data flow more organised, why not added a section below list instead of mixing different objects? can even add a section labeled Logged out accounts
<Text style={styles.name}>{`@${item.username}`}</Text> | ||
const _handlePressAccountTile = (item) => { | ||
if ( | ||
item && |
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 huge logic can be simplified using ?
and !
operators.
…into sa/save-loggedin-users
* added delete option for saved users list
@noumantahir PR updated according to review
Monosnap.screencast.2024-08-10.20-15-21.mp4 |
@noumantahir updated icon |
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.
One corner case that needs handling is, if I logout of every account and try to login again, there is no way to select from logged out list. it directly lands login screen.
My suggestion would be to open account switch modal at-least at these two places. or only open account switcher if there is at-least one logged out user.
@@ -72,6 +79,7 @@ interface State { | |||
hidePostsThumbnails: boolean; | |||
isTermsAccepted: boolean; | |||
isBiometricEnabled: boolean; | |||
prevLoggedInUsers: PrevLoggedInUsers[]; |
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.
@noumantahir PR updated as per review.
|
lgtm |
What does this PR?
This PR keep track of previously logged out users and show them in account bottom sheet for easy login.
User is redirected to login screen with prefilled username
Issue number
fixes #2904
Screenshots/Video
Monosnap.screencast.2024-08-03.13-00-23.mp4