From 59087ac1d4d7a74b182bc3a4237d54552bf014c1 Mon Sep 17 00:00:00 2001 From: syedansar Date: Sat, 8 Oct 2022 12:41:26 +0530 Subject: [PATCH] Muted streams sorted as per the web app --- src/streams/StreamIcon.js | 9 ++++----- src/streams/SubscriptionsScreen.js | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/streams/StreamIcon.js b/src/streams/StreamIcon.js index b5abc1b60f2..8038304d3a2 100644 --- a/src/streams/StreamIcon.js +++ b/src/streams/StreamIcon.js @@ -3,7 +3,7 @@ import React from 'react'; import type { Node } from 'react'; import type { TextStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet'; -import { IconMute, IconStream, IconPrivate, IconWebPublic } from '../common/Icons'; +import { IconStream, IconPrivate, IconWebPublic } from '../common/Icons'; type Props = $ReadOnly<{| color?: string, @@ -15,12 +15,11 @@ type Props = $ReadOnly<{| |}>; export default function StreamIcon(props: Props): Node { - const { color, style, isPrivate, isMuted, isWebPublic, size } = props; + const { color, style, isPrivate, isWebPublic, size } = props; let Component = undefined; - if (isMuted) { - Component = IconMute; - } else if (isPrivate) { + + if (isPrivate) { Component = IconPrivate; } else if (isWebPublic ?? false) { Component = IconWebPublic; diff --git a/src/streams/SubscriptionsScreen.js b/src/streams/SubscriptionsScreen.js index 98ecf3f3a26..9a88af92b2a 100644 --- a/src/streams/SubscriptionsScreen.js +++ b/src/streams/SubscriptionsScreen.js @@ -60,7 +60,8 @@ export default function SubscriptionsScreen(props: Props): Node { .sort((a, b) => caseInsensitiveCompareFunc(a.name, b.name)); return [ { key: 'Pinned', data: sortedSubscriptions.filter(x => x.pin_to_top) }, - { key: 'Unpinned', data: sortedSubscriptions.filter(x => !x.pin_to_top) }, + { key: 'Unpinned', data: sortedSubscriptions.filter(x => !x.pin_to_top && x.in_home_view) }, + { key: 'Muted', data: sortedSubscriptions.filter(x => !x.pin_to_top && !x.in_home_view) }, ]; }, [subscriptions]);