Skip to content

Commit

Permalink
Revert optional status changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Jan 31, 2024
1 parent 69ff971 commit 6d59633
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/pages/home/sidebar/AvatarWithOptionalStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ function AvatarWithOptionalStatus({emojiStatus, isCreateMenuOpen}) {
const styles = useThemeStyles();
const {translate} = useLocalize();

const showSettingsPage = useCallback(() => {
const showStatusPage = useCallback(() => {
if (isCreateMenuOpen) {
// Prevent opening Settings page when click profile avatar quickly after clicking FAB icon
return;
}

Navigation.navigate(ROUTES.SETTINGS);
Navigation.setShouldPopAllStateOnUP();
Navigation.navigate(ROUTES.SETTINGS_STATUS);
}, [isCreateMenuOpen]);

return (
Expand All @@ -44,15 +45,17 @@ function AvatarWithOptionalStatus({emojiStatus, isCreateMenuOpen}) {
<PressableWithoutFeedback
accessibilityLabel={translate('sidebarScreen.buttonMySettings')}
role={CONST.ROLE.BUTTON}
onPress={showSettingsPage}
onPress={showStatusPage}
style={[styles.sidebarStatusAvatar]}
>
<Text
style={styles.emojiStatusLHN}
numberOfLines={1}
>
{emojiStatus}
</Text>
<Tooltip text={translate('statusPage.status')}>
<Text
style={styles.emojiStatusLHN}
numberOfLines={1}
>
{emojiStatus}
</Text>
</Tooltip>
</PressableWithoutFeedback>
</View>
);
Expand Down

0 comments on commit 6d59633

Please sign in to comment.