diff options
Diffstat (limited to 'apps/mobile/components')
| -rw-r--r-- | apps/mobile/components/bookmarks/BookmarkCard.tsx | 4 | ||||
| -rw-r--r-- | apps/mobile/components/ui/CustomSafeAreaView.tsx | 28 |
2 files changed, 30 insertions, 2 deletions
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 ( + <SafeAreaView + style={{ + paddingTop: + // Some ugly hacks to make the app look the same on both android and ios + Platform.OS == "android" + ? headerHeight > 0 + ? headerHeight + : insets.top + : undefined, + }} + > + {children} + </SafeAreaView> + ); +} |
