PR feedback

This commit is contained in:
Elias Nahum
2022-03-23 09:05:20 -03:00
parent 98d7ca6ea4
commit 65ceaed538
5 changed files with 6 additions and 8 deletions

View File

@@ -65,7 +65,7 @@ const ChannelListItem = ({channel, isActive, isOwnDirectMessage, isMuted, myChan
const serverUrl = useServerUrl();
// Make it brighter if it's not muted, and highlighted or has unreads
const bright = !isMuted && (myChannel?.isUnread || (myChannel?.mentionsCount ?? 0) > 0);
const bright = !isMuted && myChannel && (myChannel.isUnread || myChannel.mentionsCount > 0);
const sharedValue = useSharedValue(collapsed && !bright);

View File

@@ -88,7 +88,7 @@ const enhance = withObservables(['category'], ({category, locale, database}: {ca
switchMap((c) => getSortedIds(database, c, locale)),
);
let limit = of$(0);
let limit = of$(20);
if (category.type === 'direct_messages') {
limit = database.get<PreferenceModel>(PREFERENCE).
query(
@@ -101,7 +101,7 @@ const enhance = withObservables(['category'], ({category, locale, database}: {ca
return of$(parseInt(val[0].value, 10));
}
return of$(0);
return of$(20);
},
),
);

View File

@@ -16,7 +16,7 @@ exports[`ThreadOverview should match snapshot when post is not saved and 0 repli
Object {
"borderBottomWidth": 0,
},
Object {},
undefined,
]
}
testID="thread-overview"
@@ -121,7 +121,7 @@ exports[`ThreadOverview should match snapshot when post is saved and has replies
"paddingHorizontal": 20,
"paddingVertical": 10,
},
Object {},
undefined,
]
}
testID="thread-overview"

View File

@@ -16,7 +16,6 @@ describe('ThreadOverview', () => {
repliesCount: 0,
rootPost: {} as PostModel,
testID: 'thread-overview',
style: {},
};
const wrapper = renderWithIntl(<ThreadOverview {...props}/>);
@@ -29,7 +28,6 @@ describe('ThreadOverview', () => {
repliesCount: 2,
rootPost: {} as PostModel,
testID: 'thread-overview',
style: {},
};
const wrapper = renderWithIntl(<ThreadOverview {...props}/>);

View File

@@ -25,7 +25,7 @@ type Props = {
repliesCount: number;
rootPost?: PostModel;
testID: string;
style: StyleProp<ViewStyle>;
style?: StyleProp<ViewStyle>;
};
const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => {