minor tweak
This commit is contained in:
parent
26d8d5b8dc
commit
f68a0ac145
|
@ -15,7 +15,7 @@ const styles = StyleSheet.create({
|
||||||
|
|
||||||
interface IRoomLeftButtonsProps {
|
interface IRoomLeftButtonsProps {
|
||||||
tmid?: string;
|
tmid?: string;
|
||||||
unreadsCount: number;
|
unreadsCount: number & string;
|
||||||
navigation: StackNavigationProp<ChatsStackParamList>;
|
navigation: StackNavigationProp<ChatsStackParamList>;
|
||||||
baseUrl: string;
|
baseUrl: string;
|
||||||
userId: string;
|
userId: string;
|
||||||
|
@ -43,7 +43,7 @@ const LeftButtons = React.memo(
|
||||||
}: IRoomLeftButtonsProps) => {
|
}: IRoomLeftButtonsProps) => {
|
||||||
if (!isMasterDetail || tmid) {
|
if (!isMasterDetail || tmid) {
|
||||||
const onPress = useCallback(() => navigation.goBack(), []);
|
const onPress = useCallback(() => navigation.goBack(), []);
|
||||||
const label: any = unreadsCount > 99 ? '+99' : unreadsCount || ' ';
|
const label = unreadsCount > 99 ? '+99' : unreadsCount || ' ';
|
||||||
const labelLength = label.length ? label.length : 1;
|
const labelLength = label.length ? label.length : 1;
|
||||||
const marginLeft = -2 * labelLength;
|
const marginLeft = -2 * labelLength;
|
||||||
const fontSize = labelLength > 1 ? 14 : 17;
|
const fontSize = labelLength > 1 ? 14 : 17;
|
||||||
|
|
Loading…
Reference in New Issue