diff options
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/com/notifications/FeedItem.tsx | 5 | ||||
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 9 | ||||
-rw-r--r-- | src/view/shell/mobile/index.tsx | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/view/com/notifications/FeedItem.tsx b/src/view/com/notifications/FeedItem.tsx index 68057a5a6..166b1bf99 100644 --- a/src/view/com/notifications/FeedItem.tsx +++ b/src/view/com/notifications/FeedItem.tsx @@ -43,6 +43,11 @@ export const FeedItem = observer(function FeedItem({ } }, [item]) + if (item.additionalPost?.notFound) { + // don't render anything if the target post was deleted or unfindable + return <View /> + } + if (item.isReply) { return ( <Link href={itemHref} title={itemTitle}> diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 85c241ce4..d08ca3e4a 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -88,6 +88,15 @@ export const PostThreadItem = observer(function PostThreadItem({ ) } + if (deleted) { + return ( + <View style={[styles.outer, s.p20, s.flexRow]}> + <FontAwesomeIcon icon={['far', 'trash-can']} style={[s.gray4]} /> + <Text style={[s.gray5, s.ml10]}>This post has been deleted.</Text> + </View> + ) + } + if (item._isHighlightedPost) { return ( <> diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx index ccde52a2c..27524bcae 100644 --- a/src/view/shell/mobile/index.tsx +++ b/src/view/shell/mobile/index.tsx @@ -321,7 +321,7 @@ export const MobileShell: React.FC = observer(() => { <Btn icon={isAtHome ? 'home-solid' : 'home'} onPress={onPressHome} - onLongPress={doNewTab('/')} + onLongPress={TABS_ENABLED ? doNewTab('/') : undefined} /> {TABS_ENABLED ? ( <Btn @@ -333,7 +333,7 @@ export const MobileShell: React.FC = observer(() => { <Btn icon={isAtNotifications ? 'bell-solid' : 'bell'} onPress={onPressNotifications} - onLongPress={doNewTab('/notifications')} + onLongPress={TABS_ENABLED ? doNewTab('/notifications') : undefined} notificationCount={store.me.notificationCount} /> <Btn |