Skip to content

Commit

Permalink
UnreadNotice [nfc]: Remove an unnecessary View.
Browse files Browse the repository at this point in the history
As Greg suggests at
  zulip#4893 (comment).
  • Loading branch information
chrisbobbe committed Jul 16, 2021
1 parent 55c5af9 commit 7c5811e
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/chat/UnreadNotice.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* @flow strict-local */

import React, { PureComponent } from 'react';
import { View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';

import type { Narrow, Dispatch } from '../types';
Expand All @@ -22,9 +21,6 @@ const styles = createStyleSheet({
safeAreaWrapper: {
flexDirection: 'row',
justifyContent: 'space-between',
},
unreadTextWrapper: {
flexDirection: 'row',
alignItems: 'center',
},
unreadText: {
Expand Down Expand Up @@ -56,19 +52,17 @@ class UnreadNotice extends PureComponent<Props> {
return (
<AnimatedScaleComponent visible={unreadCount > 0} style={styles.unreadContainer}>
<SafeAreaView mode="padding" edges={['right', 'left']} style={styles.safeAreaWrapper}>
<View style={styles.unreadTextWrapper}>
<Label
style={styles.unreadText}
text={{
text: `{unreadCount, plural,
<Label
style={styles.unreadText}
text={{
text: `{unreadCount, plural,
=0 {No unread messages}
=1 {# unread message}
other {# unread messages}
}`,
values: { unreadCount },
}}
/>
</View>
values: { unreadCount },
}}
/>
<MarkAsReadButton narrow={narrow} />
</SafeAreaView>
</AnimatedScaleComponent>
Expand Down

0 comments on commit 7c5811e

Please sign in to comment.