update splitview list styles
This commit is contained in:
@@ -376,6 +376,7 @@ export function ChatList({
|
|||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
contentContainerStyle={isWithinSplitView && a.py_sm}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ function DirectChatItem({
|
|||||||
}) {
|
}) {
|
||||||
const {t: l} = useLingui()
|
const {t: l} = useLingui()
|
||||||
const profile = useProfileShadow(convo.primaryMember)
|
const profile = useProfileShadow(convo.primaryMember)
|
||||||
const {isWithinLeftPanel} = useIsWithinSplitView()
|
const {isWithinSplitView} = useIsWithinSplitView()
|
||||||
|
|
||||||
const moderation = useMemo(
|
const moderation = useMemo(
|
||||||
() => moderateProfile(profile, moderationOpts),
|
() => moderateProfile(profile, moderationOpts),
|
||||||
@@ -137,7 +137,7 @@ function DirectChatItem({
|
|||||||
avatar={
|
avatar={
|
||||||
<PreviewableUserAvatar
|
<PreviewableUserAvatar
|
||||||
profile={profile}
|
profile={profile}
|
||||||
size={52}
|
size={isWithinSplitView ? 48 : 52}
|
||||||
moderation={moderation.ui('avatar')}
|
moderation={moderation.ui('avatar')}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,7 @@ function DirectChatItem({
|
|||||||
isBlockedAccount={moderation.blocked}
|
isBlockedAccount={moderation.blocked}
|
||||||
showProfileBadges
|
showProfileBadges
|
||||||
postAlerts={
|
postAlerts={
|
||||||
isWithinLeftPanel ? null : (
|
isWithinSplitView ? null : (
|
||||||
<PostAlerts
|
<PostAlerts
|
||||||
modui={moderation.ui('contentList')}
|
modui={moderation.ui('contentList')}
|
||||||
size="sm"
|
size="sm"
|
||||||
@@ -186,6 +186,7 @@ function GroupChatItem({
|
|||||||
}) {
|
}) {
|
||||||
const {t: l} = useLingui()
|
const {t: l} = useLingui()
|
||||||
const groupOwner = useMaybeProfileShadow(convo.primaryMember)
|
const groupOwner = useMaybeProfileShadow(convo.primaryMember)
|
||||||
|
const {isWithinSplitView} = useIsWithinSplitView()
|
||||||
|
|
||||||
const moderation = useMemo(
|
const moderation = useMemo(
|
||||||
() =>
|
() =>
|
||||||
@@ -198,7 +199,12 @@ function GroupChatItem({
|
|||||||
return (
|
return (
|
||||||
<BaseChatItem
|
<BaseChatItem
|
||||||
convo={convo}
|
convo={convo}
|
||||||
avatar={<AvatarBubbles profiles={convo.members} size={52} />}
|
avatar={
|
||||||
|
<AvatarBubbles
|
||||||
|
profiles={convo.members}
|
||||||
|
size={isWithinSplitView ? 48 : 52}
|
||||||
|
/>
|
||||||
|
}
|
||||||
title={chatName}
|
title={chatName}
|
||||||
accessibilityHint={l`Go to the group chat named "${chatName}"`}
|
accessibilityHint={l`Go to the group chat named "${chatName}"`}
|
||||||
primaryProfile={groupOwner}
|
primaryProfile={groupOwner}
|
||||||
@@ -252,6 +258,7 @@ function BaseChatItem({
|
|||||||
const leaveConvoControl = useDialogControl()
|
const leaveConvoControl = useDialogControl()
|
||||||
const {mutate: markAsRead} = useMarkAsReadMutation()
|
const {mutate: markAsRead} = useMarkAsReadMutation()
|
||||||
const {gtMobile} = useBreakpoints()
|
const {gtMobile} = useBreakpoints()
|
||||||
|
const {isWithinSplitView} = useIsWithinSplitView()
|
||||||
|
|
||||||
const playHaptic = useHaptics()
|
const playHaptic = useHaptics()
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
@@ -423,6 +430,8 @@ function BaseChatItem({
|
|||||||
leftFirst: deleteAction,
|
leftFirst: deleteAction,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const avatarSize = isWithinSplitView ? 48 : 52
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ChatListItemPortal.Provider>
|
<ChatListItemPortal.Provider>
|
||||||
<GestureActionView actions={actions}>
|
<GestureActionView actions={actions}>
|
||||||
@@ -432,7 +441,7 @@ function BaseChatItem({
|
|||||||
// @ts-expect-error web only
|
// @ts-expect-error web only
|
||||||
onFocus={onFocus}
|
onFocus={onFocus}
|
||||||
onBlur={onMouseLeave}
|
onBlur={onMouseLeave}
|
||||||
style={[a.relative, t.atoms.bg]}>
|
style={[a.relative, t.atoms.bg, isWithinSplitView && a.mx_sm]}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.z_10,
|
a.z_10,
|
||||||
@@ -473,14 +482,15 @@ function BaseChatItem({
|
|||||||
a.px_lg,
|
a.px_lg,
|
||||||
a.py_md,
|
a.py_md,
|
||||||
a.gap_md,
|
a.gap_md,
|
||||||
selected && t.atoms.bg_contrast_25,
|
isWithinSplitView && a.rounded_sm,
|
||||||
(hovered || pressed || focused) && t.atoms.bg_contrast_50,
|
(hovered || pressed || focused) && t.atoms.bg_contrast_25,
|
||||||
|
selected && t.atoms.bg_contrast_50,
|
||||||
]}>
|
]}>
|
||||||
{/* Avatar goes here */}
|
{/* Avatar goes here */}
|
||||||
<View style={{width: 52, height: 52}} />
|
<View style={{width: avatarSize, height: avatarSize}} />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style={[a.flex_1, a.justify_center, web({paddingRight: 45})]}>
|
style={[a.flex_1, a.justify_center, web({paddingRight: 40})]}>
|
||||||
<View style={[a.w_full, a.flex_row, a.align_end, a.pb_2xs]}>
|
<View style={[a.w_full, a.flex_row, a.align_end, a.pb_2xs]}>
|
||||||
<View style={[a.flex_shrink]}>
|
<View style={[a.flex_shrink]}>
|
||||||
<Text
|
<Text
|
||||||
|
|||||||
Reference in New Issue
Block a user