Skip to content

Commit

Permalink
TopicItem [nfc]: Make stream name required.
Browse files Browse the repository at this point in the history
It will be needed for the actionsheet, and will cause bugs for it to not
exist.
  • Loading branch information
WesleyAC authored and chrisbobbe committed Apr 8, 2021
1 parent a3fab39 commit c93db0f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/streams/TopicItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const componentStyles = createStyleSheet({
});

type Props = $ReadOnly<{|
stream?: string,
stream: string,
name: string,
isMuted?: boolean,
isSelected?: boolean,
Expand All @@ -31,14 +31,7 @@ type Props = $ReadOnly<{|
|}>;

export default function TopicItem(props: Props) {
const {
name,
stream = '',
isMuted = false,
isSelected = false,
unreadCount = 0,
onPress,
} = props;
const { name, stream, isMuted = false, isSelected = false, unreadCount = 0, onPress } = props;

return (
<Touchable onPress={() => onPress(stream, name)} onLongPress={() => showToast(name)}>
Expand Down

0 comments on commit c93db0f

Please sign in to comment.