diff options
author | dan <dan.abramov@gmail.com> | 2024-01-26 05:24:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 21:24:24 -0800 |
commit | c8175b9c4e6c4a7b614ec46807db91c3dee529de (patch) | |
tree | 4a177b9112abd5bbf387060dcf544a1cc5c52e69 | |
parent | 23a4bbf6082a7d02c7dbf0af74f81e2200327eb0 (diff) | |
download | voidsky-c8175b9c4e6c4a7b614ec46807db91c3dee529de.tar.zst |
Add missing top border to notifications loading state (#2635)
-rw-r--r-- | src/view/com/notifications/Feed.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx index 015aaaa23..dd439d475 100644 --- a/src/view/com/notifications/Feed.tsx +++ b/src/view/com/notifications/Feed.tsx @@ -15,6 +15,7 @@ import {useModerationOpts} from '#/state/queries/preferences' import {List, ListRef} from '../util/List' import {useLingui} from '@lingui/react' import {msg} from '@lingui/macro' +import {usePalette} from '#/lib/hooks/usePalette' const EMPTY_FEED_ITEM = {_reactKey: '__empty__'} const LOAD_MORE_ERROR_ITEM = {_reactKey: '__load_more_error__'} @@ -32,6 +33,7 @@ export function Feed({ ListHeaderComponent?: () => JSX.Element }) { const [isPTRing, setIsPTRing] = React.useState(false) + const pal = usePalette('default') const {_} = useLingui() const moderationOpts = useModerationOpts() @@ -118,11 +120,15 @@ export function Feed({ /> ) } else if (item === LOADING_ITEM) { - return <NotificationFeedLoadingPlaceholder /> + return ( + <View style={[pal.border, {borderTopWidth: 1}]}> + <NotificationFeedLoadingPlaceholder /> + </View> + ) } return <FeedItem item={item} moderationOpts={moderationOpts!} /> }, - [onPressRetryLoadMore, moderationOpts, _], + [onPressRetryLoadMore, moderationOpts, _, pal.border], ) const FeedFooter = React.useCallback( |