From 65c4a1340d2ba326152f246571da8a4b97268339 Mon Sep 17 00:00:00 2001 From: sarendsen Date: Thu, 30 Jan 2025 11:19:36 +0100 Subject: [PATCH] WIP --- components/common/TouchableItemRouter.tsx | 158 ++++++++++++---------- 1 file changed, 87 insertions(+), 71 deletions(-) diff --git a/components/common/TouchableItemRouter.tsx b/components/common/TouchableItemRouter.tsx index cb6dff12..ceb13638 100644 --- a/components/common/TouchableItemRouter.tsx +++ b/components/common/TouchableItemRouter.tsx @@ -1,4 +1,5 @@ import { useMarkAsPlayed } from "@/hooks/useMarkAsPlayed"; +import { Platform } from "react-native"; import { BaseItemDto, BaseItemPerson, @@ -67,79 +68,94 @@ export const TouchableItemRouter: React.FC> = ({ from === "(libraries)" || from === "(favorites)" ) - return ( - - - { - const url = itemRouter(item, from); - // @ts-ignore - router.push(url); - }} - {...props} - > - {children} - - - { + const url = itemRouter(item, from); + // @ts-ignore + router.push(url); + }} + {...props} > - Actions - { - markAsPlayedStatus(true); - }} - shouldDismissMenuOnSelect - > - - Mark as watched - - + ); + } else { + return ( + + + { + const url = itemRouter(item, from); + // @ts-ignore + router.push(url); }} - androidIconName="checkmark-circle" - > - - { - markAsPlayedStatus(false); - }} - shouldDismissMenuOnSelect - destructive + {...props} + > + {children} + + + - - Mark as not watched - - Actions + { + markAsPlayedStatus(true); }} - androidIconName="eye-slash" - > - - - - ); + shouldDismissMenuOnSelect + > + + Mark as watched + + + + { + markAsPlayedStatus(false); + }} + shouldDismissMenuOnSelect + destructive + > + + Mark as not watched + + + + + + ); + } };