UserItem: Fix recent regression where UnreadCount was misaligned#5297
Merged
gnprice merged 2 commits intozulip:mainfrom Mar 16, 2022
Merged
UserItem: Fix recent regression where UnreadCount was misaligned#5297gnprice merged 2 commits intozulip:mainfrom
gnprice merged 2 commits intozulip:mainfrom
Conversation
Member
|
Thanks! Let's do this by inserting a spacer View, rather than wrapping in a wrapper View. Like this: @@ -31,6 +31,9 @@ const componentStyles = createStyleSheet({
fontSize: 10,
color: 'hsl(0, 0%, 60%)',
},
+ spacer: {
+ flex: 1,
+ },
});
type Props<UserT> = $ReadOnly<{|
@@ -103,6 +106,7 @@ export function UserItemRaw<
/>
</View>
)}
+ <View style={componentStyles.spacer} />
<UnreadCount count={unreadCount} inverse={isSelected} />
</View>
</Touchable>I think that keeps the code simpler. |
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this pull request
Mar 16, 2022
See the code comments, and see screenshots of the bug at zulip#5277 (comment) And Greg's suggestion to use this spacer View, to help keep the code simpler: zulip#5297 (comment)
77da5b2 to
fa92d57
Compare
Contributor
Author
|
Thanks for the review! Revision pushed, along with a fix for a bug on |
See the code comments, and see screenshots of the bug at zulip#5277 (comment) And Greg's suggestion to use this spacer View, to help keep the code simpler: zulip#5297 (comment)
fa92d57 to
72f21d5
Compare
Member
|
Thanks! Looks good; merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the code comments, and see screenshots of the bug at
#5277 (comment)