rm unreadNotifBg

This commit is contained in:
Samuel Newman
2026-04-17 11:06:53 +03:00
parent e10c05d735
commit 0568e9e0d6
3 changed files with 6 additions and 16 deletions
-2
View File
@@ -54,8 +54,6 @@ export const colors = {
green3: '#20bc07', green3: '#20bc07',
green4: '#148203', green4: '#148203',
green5: '#082b03', green5: '#082b03',
unreadNotifBg: '#ebf6ff',
} }
/** /**
-6
View File
@@ -24,8 +24,6 @@ export const defaultTheme: Theme = {
textVeryLight: lightPalette.contrast_400, textVeryLight: lightPalette.contrast_400,
replyLine: lightPalette.contrast_100, replyLine: lightPalette.contrast_100,
replyLineDot: lightPalette.contrast_200, replyLineDot: lightPalette.contrast_200,
unreadNotifBg: lightPalette.primary_25,
unreadNotifBorder: lightPalette.primary_100,
postCtrl: lightPalette.contrast_500, postCtrl: lightPalette.contrast_500,
brandText: lightPalette.primary_500, brandText: lightPalette.primary_500,
emptyStateIcon: lightPalette.contrast_300, emptyStateIcon: lightPalette.contrast_300,
@@ -310,8 +308,6 @@ export const darkTheme: Theme = {
textVeryLight: darkPalette.contrast_400, textVeryLight: darkPalette.contrast_400,
replyLine: darkPalette.contrast_200, replyLine: darkPalette.contrast_200,
replyLineDot: darkPalette.contrast_200, replyLineDot: darkPalette.contrast_200,
unreadNotifBg: darkPalette.primary_25,
unreadNotifBorder: darkPalette.primary_100,
postCtrl: darkPalette.contrast_500, postCtrl: darkPalette.contrast_500,
brandText: darkPalette.primary_500, brandText: darkPalette.primary_500,
emptyStateIcon: darkPalette.contrast_300, emptyStateIcon: darkPalette.contrast_300,
@@ -359,8 +355,6 @@ export const dimTheme: Theme = {
textVeryLight: dimPalette.contrast_400, textVeryLight: dimPalette.contrast_400,
replyLine: dimPalette.contrast_200, replyLine: dimPalette.contrast_200,
replyLineDot: dimPalette.contrast_200, replyLineDot: dimPalette.contrast_200,
unreadNotifBg: dimPalette.primary_25,
unreadNotifBorder: dimPalette.primary_100,
postCtrl: dimPalette.contrast_500, postCtrl: dimPalette.contrast_500,
brandText: dimPalette.primary_500, brandText: dimPalette.primary_500,
emptyStateIcon: dimPalette.contrast_300, emptyStateIcon: dimPalette.contrast_300,
@@ -26,7 +26,6 @@ import {useQueryClient} from '@tanstack/react-query'
import {DM_SERVICE_HEADERS, MAX_POST_LINES} from '#/lib/constants' import {DM_SERVICE_HEADERS, MAX_POST_LINES} from '#/lib/constants'
import {useAnimatedValue} from '#/lib/hooks/useAnimatedValue' import {useAnimatedValue} from '#/lib/hooks/useAnimatedValue'
import {usePalette} from '#/lib/hooks/usePalette'
import {makeProfileLink} from '#/lib/routes/links' import {makeProfileLink} from '#/lib/routes/links'
import {type NavigationProp} from '#/lib/routes/types' import {type NavigationProp} from '#/lib/routes/types'
import {forceLTR} from '#/lib/strings/bidi' import {forceLTR} from '#/lib/strings/bidi'
@@ -92,10 +91,9 @@ let NotificationFeedItem = ({
hideTopBorder?: boolean hideTopBorder?: boolean
}): React.ReactNode => { }): React.ReactNode => {
const queryClient = useQueryClient() const queryClient = useQueryClient()
const pal = usePalette('default')
const t = useTheme() const t = useTheme()
const {_, i18n} = useLingui() const {_, i18n} = useLingui()
const [isAuthorsExpanded, setAuthorsExpanded] = useState<boolean>(false) const [isAuthorsExpanded, setIsAuthorsExpanded] = useState<boolean>(false)
const itemHref = useMemo(() => { const itemHref = useMemo(() => {
switch (item.type) { switch (item.type) {
case 'post-like': case 'post-like':
@@ -145,7 +143,7 @@ let NotificationFeedItem = ({
e.preventDefault() e.preventDefault()
e.stopPropagation() e.stopPropagation()
} }
setAuthorsExpanded(currentlyExpanded => !currentlyExpanded) setIsAuthorsExpanded(currentlyExpanded => !currentlyExpanded)
} }
const onBeforePress = useCallback(() => { const onBeforePress = useCallback(() => {
@@ -222,8 +220,8 @@ let NotificationFeedItem = ({
post={item.subject} post={item.subject}
style={ style={
isHighlighted && { isHighlighted && {
backgroundColor: pal.colors.unreadNotifBg, backgroundColor: t.palette.primary_25,
borderColor: pal.colors.unreadNotifBorder, borderColor: t.palette.primary_100,
} }
} }
hideTopBorder={hideTopBorder} hideTopBorder={hideTopBorder}
@@ -577,8 +575,8 @@ let NotificationFeedItem = ({
item.notification.isRead item.notification.isRead
? undefined ? undefined
: { : {
backgroundColor: pal.colors.unreadNotifBg, backgroundColor: t.palette.primary_25,
borderColor: pal.colors.unreadNotifBorder, borderColor: t.palette.primary_100,
}, },
!hideTopBorder && a.border_t, !hideTopBorder && a.border_t,
a.overflow_hidden, a.overflow_hidden,