From 26b53e2ccc00befd182c4af05ab52fc439be7535 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Fri, 29 Mar 2024 14:17:36 +0000 Subject: mobile(android): Getting the android app ready for submission --- apps/mobile/components/bookmarks/BookmarkCard.tsx | 4 ++-- apps/mobile/components/ui/CustomSafeAreaView.tsx | 28 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 apps/mobile/components/ui/CustomSafeAreaView.tsx (limited to 'apps/mobile/components') diff --git a/apps/mobile/components/bookmarks/BookmarkCard.tsx b/apps/mobile/components/bookmarks/BookmarkCard.tsx index ac6eaea4..89ce7924 100644 --- a/apps/mobile/components/bookmarks/BookmarkCard.tsx +++ b/apps/mobile/components/bookmarks/BookmarkCard.tsx @@ -63,6 +63,7 @@ function ActionBar({ bookmark }: { bookmark: ZBookmark }) { showProgress: false, }); apiUtils.bookmarks.getBookmarks.invalidate(); + apiUtils.bookmarks.searchBookmarks.invalidate(); }, onError, }); @@ -85,6 +86,7 @@ function ActionBar({ bookmark }: { bookmark: ZBookmark }) { }); apiUtils.bookmarks.getBookmarks.invalidate(); apiUtils.bookmarks.getBookmark.invalidate({ bookmarkId: bookmark.id }); + apiUtils.bookmarks.searchBookmarks.invalidate(); }, onError, }); @@ -128,7 +130,6 @@ function ActionBar({ bookmark }: { bookmark: ZBookmark }) { title: bookmark.archived ? "Un-archive" : "Archive", image: Platform.select({ ios: "folder", - android: "ic_menu_folder", }), }, { @@ -139,7 +140,6 @@ function ActionBar({ bookmark }: { bookmark: ZBookmark }) { }, image: Platform.select({ ios: "trash", - android: "ic_menu_delete", }), }, ]} diff --git a/apps/mobile/components/ui/CustomSafeAreaView.tsx b/apps/mobile/components/ui/CustomSafeAreaView.tsx new file mode 100644 index 00000000..c97dfe72 --- /dev/null +++ b/apps/mobile/components/ui/CustomSafeAreaView.tsx @@ -0,0 +1,28 @@ +import { Platform, SafeAreaView } from "react-native"; +import { useSafeAreaInsets } from "react-native-safe-area-context"; +import { useHeaderHeight } from "@react-navigation/elements"; + +export default function CustomSafeAreaView({ + children, +}: { + children: React.ReactNode; +}) { + const insets = useSafeAreaInsets(); + const headerHeight = useHeaderHeight(); + + return ( + 0 + ? headerHeight + : insets.top + : undefined, + }} + > + {children} + + ); +} -- cgit v1.2.3-70-g09d2