Show bottom-left profile photo in nightly builds and in development
This commit is contained in:
parent
30bc3c14a8
commit
c42f59f10e
2 changed files with 10 additions and 10 deletions
|
@ -196,7 +196,6 @@ export type NavTabsProps = Readonly<{
|
||||||
hasFailedStorySends: boolean;
|
hasFailedStorySends: boolean;
|
||||||
hasPendingUpdate: boolean;
|
hasPendingUpdate: boolean;
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
isInternalUser: boolean;
|
|
||||||
me: ConversationType;
|
me: ConversationType;
|
||||||
navTabsCollapsed: boolean;
|
navTabsCollapsed: boolean;
|
||||||
onChangeLocation: (location: Location) => void;
|
onChangeLocation: (location: Location) => void;
|
||||||
|
@ -206,6 +205,7 @@ export type NavTabsProps = Readonly<{
|
||||||
renderStoriesTab: () => ReactNode;
|
renderStoriesTab: () => ReactNode;
|
||||||
renderSettingsTab: () => ReactNode;
|
renderSettingsTab: () => ReactNode;
|
||||||
selectedNavTab: NavTab;
|
selectedNavTab: NavTab;
|
||||||
|
shouldShowProfileIcon: boolean;
|
||||||
storiesEnabled: boolean;
|
storiesEnabled: boolean;
|
||||||
theme: ThemeType;
|
theme: ThemeType;
|
||||||
unreadCallsCount: number;
|
unreadCallsCount: number;
|
||||||
|
@ -218,7 +218,6 @@ export function NavTabs({
|
||||||
hasFailedStorySends,
|
hasFailedStorySends,
|
||||||
hasPendingUpdate,
|
hasPendingUpdate,
|
||||||
i18n,
|
i18n,
|
||||||
isInternalUser,
|
|
||||||
me,
|
me,
|
||||||
navTabsCollapsed,
|
navTabsCollapsed,
|
||||||
onChangeLocation,
|
onChangeLocation,
|
||||||
|
@ -228,6 +227,7 @@ export function NavTabs({
|
||||||
renderStoriesTab,
|
renderStoriesTab,
|
||||||
renderSettingsTab,
|
renderSettingsTab,
|
||||||
selectedNavTab,
|
selectedNavTab,
|
||||||
|
shouldShowProfileIcon,
|
||||||
storiesEnabled,
|
storiesEnabled,
|
||||||
theme,
|
theme,
|
||||||
unreadCallsCount,
|
unreadCallsCount,
|
||||||
|
@ -323,7 +323,7 @@ export function NavTabs({
|
||||||
hasPendingUpdate={hasPendingUpdate}
|
hasPendingUpdate={hasPendingUpdate}
|
||||||
/>
|
/>
|
||||||
</TabList>
|
</TabList>
|
||||||
{isInternalUser && (
|
{shouldShowProfileIcon && (
|
||||||
<div className="NavTabs__Misc">
|
<div className="NavTabs__Misc">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import type { ReactNode } from 'react';
|
||||||
import React, { memo, useCallback } from 'react';
|
import React, { memo, useCallback } from 'react';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { NavTabs } from '../../components/NavTabs';
|
import { NavTabs } from '../../components/NavTabs';
|
||||||
import { getIntl, getTheme } from '../selectors/user';
|
import { getIntl, getTheme, getIsNightly } from '../selectors/user';
|
||||||
import {
|
import {
|
||||||
getAllConversationsUnreadStats,
|
getAllConversationsUnreadStats,
|
||||||
getMe,
|
getMe,
|
||||||
|
@ -15,15 +15,13 @@ import {
|
||||||
getHasAnyFailedStorySends,
|
getHasAnyFailedStorySends,
|
||||||
getStoriesNotificationCount,
|
getStoriesNotificationCount,
|
||||||
} from '../selectors/stories';
|
} from '../selectors/stories';
|
||||||
import {
|
import { getStoriesEnabled } from '../selectors/items';
|
||||||
getStoriesEnabled,
|
|
||||||
isInternalUser as isInternalUserSelector,
|
|
||||||
} from '../selectors/items';
|
|
||||||
import { getSelectedNavTab } from '../selectors/nav';
|
import { getSelectedNavTab } from '../selectors/nav';
|
||||||
import type { Location } from '../ducks/nav';
|
import type { Location } from '../ducks/nav';
|
||||||
import { useNavActions } from '../ducks/nav';
|
import { useNavActions } from '../ducks/nav';
|
||||||
import { getHasPendingUpdate } from '../selectors/updates';
|
import { getHasPendingUpdate } from '../selectors/updates';
|
||||||
import { getCallHistoryUnreadCount } from '../selectors/callHistory';
|
import { getCallHistoryUnreadCount } from '../selectors/callHistory';
|
||||||
|
import { Environment } from '../../environment';
|
||||||
|
|
||||||
export type SmartNavTabsProps = Readonly<{
|
export type SmartNavTabsProps = Readonly<{
|
||||||
navTabsCollapsed: boolean;
|
navTabsCollapsed: boolean;
|
||||||
|
@ -54,7 +52,9 @@ export const SmartNavTabs = memo(function SmartNavTabs({
|
||||||
const unreadCallsCount = useSelector(getCallHistoryUnreadCount);
|
const unreadCallsCount = useSelector(getCallHistoryUnreadCount);
|
||||||
const hasFailedStorySends = useSelector(getHasAnyFailedStorySends);
|
const hasFailedStorySends = useSelector(getHasAnyFailedStorySends);
|
||||||
const hasPendingUpdate = useSelector(getHasPendingUpdate);
|
const hasPendingUpdate = useSelector(getHasPendingUpdate);
|
||||||
const isInternalUser = useSelector(isInternalUserSelector);
|
const shouldShowProfileIcon =
|
||||||
|
useSelector(getIsNightly) ||
|
||||||
|
window.SignalContext.getEnvironment() !== Environment.PackagedApp;
|
||||||
|
|
||||||
const onChangeLocation = useCallback(
|
const onChangeLocation = useCallback(
|
||||||
(location: Location) => {
|
(location: Location) => {
|
||||||
|
@ -73,7 +73,6 @@ export const SmartNavTabs = memo(function SmartNavTabs({
|
||||||
hasFailedStorySends={hasFailedStorySends}
|
hasFailedStorySends={hasFailedStorySends}
|
||||||
hasPendingUpdate={hasPendingUpdate}
|
hasPendingUpdate={hasPendingUpdate}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isInternalUser={isInternalUser}
|
|
||||||
me={me}
|
me={me}
|
||||||
navTabsCollapsed={navTabsCollapsed}
|
navTabsCollapsed={navTabsCollapsed}
|
||||||
onChangeLocation={onChangeLocation}
|
onChangeLocation={onChangeLocation}
|
||||||
|
@ -83,6 +82,7 @@ export const SmartNavTabs = memo(function SmartNavTabs({
|
||||||
renderStoriesTab={renderStoriesTab}
|
renderStoriesTab={renderStoriesTab}
|
||||||
renderSettingsTab={renderSettingsTab}
|
renderSettingsTab={renderSettingsTab}
|
||||||
selectedNavTab={selectedNavTab}
|
selectedNavTab={selectedNavTab}
|
||||||
|
shouldShowProfileIcon={shouldShowProfileIcon}
|
||||||
storiesEnabled={storiesEnabled}
|
storiesEnabled={storiesEnabled}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
unreadCallsCount={unreadCallsCount}
|
unreadCallsCount={unreadCallsCount}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue