Show bottom-left profile photo in nightly builds and in development

This commit is contained in:
Scott Nonnenberg 2025-06-05 03:14:20 +10:00 committed by GitHub
commit c42f59f10e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View file

@ -196,7 +196,6 @@ export type NavTabsProps = Readonly<{
hasFailedStorySends: boolean;
hasPendingUpdate: boolean;
i18n: LocalizerType;
isInternalUser: boolean;
me: ConversationType;
navTabsCollapsed: boolean;
onChangeLocation: (location: Location) => void;
@ -206,6 +205,7 @@ export type NavTabsProps = Readonly<{
renderStoriesTab: () => ReactNode;
renderSettingsTab: () => ReactNode;
selectedNavTab: NavTab;
shouldShowProfileIcon: boolean;
storiesEnabled: boolean;
theme: ThemeType;
unreadCallsCount: number;
@ -218,7 +218,6 @@ export function NavTabs({
hasFailedStorySends,
hasPendingUpdate,
i18n,
isInternalUser,
me,
navTabsCollapsed,
onChangeLocation,
@ -228,6 +227,7 @@ export function NavTabs({
renderStoriesTab,
renderSettingsTab,
selectedNavTab,
shouldShowProfileIcon,
storiesEnabled,
theme,
unreadCallsCount,
@ -323,7 +323,7 @@ export function NavTabs({
hasPendingUpdate={hasPendingUpdate}
/>
</TabList>
{isInternalUser && (
{shouldShowProfileIcon && (
<div className="NavTabs__Misc">
<button
type="button"

View file

@ -5,7 +5,7 @@ import type { ReactNode } from 'react';
import React, { memo, useCallback } from 'react';
import { useSelector } from 'react-redux';
import { NavTabs } from '../../components/NavTabs';
import { getIntl, getTheme } from '../selectors/user';
import { getIntl, getTheme, getIsNightly } from '../selectors/user';
import {
getAllConversationsUnreadStats,
getMe,
@ -15,15 +15,13 @@ import {
getHasAnyFailedStorySends,
getStoriesNotificationCount,
} from '../selectors/stories';
import {
getStoriesEnabled,
isInternalUser as isInternalUserSelector,
} from '../selectors/items';
import { getStoriesEnabled } from '../selectors/items';
import { getSelectedNavTab } from '../selectors/nav';
import type { Location } from '../ducks/nav';
import { useNavActions } from '../ducks/nav';
import { getHasPendingUpdate } from '../selectors/updates';
import { getCallHistoryUnreadCount } from '../selectors/callHistory';
import { Environment } from '../../environment';
export type SmartNavTabsProps = Readonly<{
navTabsCollapsed: boolean;
@ -54,7 +52,9 @@ export const SmartNavTabs = memo(function SmartNavTabs({
const unreadCallsCount = useSelector(getCallHistoryUnreadCount);
const hasFailedStorySends = useSelector(getHasAnyFailedStorySends);
const hasPendingUpdate = useSelector(getHasPendingUpdate);
const isInternalUser = useSelector(isInternalUserSelector);
const shouldShowProfileIcon =
useSelector(getIsNightly) ||
window.SignalContext.getEnvironment() !== Environment.PackagedApp;
const onChangeLocation = useCallback(
(location: Location) => {
@ -73,7 +73,6 @@ export const SmartNavTabs = memo(function SmartNavTabs({
hasFailedStorySends={hasFailedStorySends}
hasPendingUpdate={hasPendingUpdate}
i18n={i18n}
isInternalUser={isInternalUser}
me={me}
navTabsCollapsed={navTabsCollapsed}
onChangeLocation={onChangeLocation}
@ -83,6 +82,7 @@ export const SmartNavTabs = memo(function SmartNavTabs({
renderStoriesTab={renderStoriesTab}
renderSettingsTab={renderSettingsTab}
selectedNavTab={selectedNavTab}
shouldShowProfileIcon={shouldShowProfileIcon}
storiesEnabled={storiesEnabled}
theme={theme}
unreadCallsCount={unreadCallsCount}