Skip to content

Commit

Permalink
Muted streams sorted as per the web app
Browse files Browse the repository at this point in the history
  • Loading branch information
Syed-Ansar committed Oct 8, 2022
1 parent 6c532de commit 59087ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/streams/StreamIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/streams/SubscriptionsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down

0 comments on commit 59087ac

Please sign in to comment.