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/app.json | 10 +++++--- apps/mobile/app/_layout.tsx | 2 +- apps/mobile/app/dashboard/(tabs)/_layout.tsx | 9 ++++++- apps/mobile/app/dashboard/(tabs)/index.tsx | 12 ++++------ apps/mobile/app/dashboard/(tabs)/lists.tsx | 9 +++---- apps/mobile/app/dashboard/(tabs)/search.tsx | 7 +++--- apps/mobile/app/dashboard/(tabs)/settings.tsx | 7 +++--- apps/mobile/app/dashboard/_layout.tsx | 4 ++-- apps/mobile/app/dashboard/archive.tsx | 6 ++--- apps/mobile/app/dashboard/favourites.tsx | 6 ++--- apps/mobile/app/dashboard/lists/[slug].tsx | 7 +++--- apps/mobile/app/dashboard/tags/[slug].tsx | 7 +++--- apps/mobile/assets/adaptive-icon.png | Bin 0 -> 9349 bytes apps/mobile/components/bookmarks/BookmarkCard.tsx | 4 ++-- apps/mobile/components/ui/CustomSafeAreaView.tsx | 28 ++++++++++++++++++++++ apps/mobile/index.ts | 1 + apps/mobile/lib/providers.tsx | 9 ++++--- apps/mobile/package.json | 7 ++++-- pnpm-lock.yaml | 17 +++++++++++++ 19 files changed, 109 insertions(+), 43 deletions(-) create mode 100644 apps/mobile/assets/adaptive-icon.png create mode 100644 apps/mobile/components/ui/CustomSafeAreaView.tsx create mode 100644 apps/mobile/index.ts diff --git a/apps/mobile/app.json b/apps/mobile/app.json index a857022c..1e9d1e34 100644 --- a/apps/mobile/app.json +++ b/apps/mobile/app.json @@ -22,8 +22,8 @@ }, "android": { "adaptiveIcon": { - "foregroundImage": "./assets/icon.png", - "backgroundColor": "#ffffff" + "foregroundImage": "./assets/adaptive-icon.png", + "backgroundColor": "#000000" }, "package": "app.hoarder.hoardermobile" }, @@ -38,7 +38,11 @@ "NSExtensionActivationSupportsImageWithMaxCount": 1, "NSExtensionActivationSupportsMovieWithMaxCount": 0, "NSExtensionActivationSupportsText": true - } + }, + "androidIntentFilters": [ + "text/*", + "image/*" + ] } ], "expo-secure-store", diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx index 9f8f8ad5..f36c9eec 100644 --- a/apps/mobile/app/_layout.tsx +++ b/apps/mobile/app/_layout.tsx @@ -24,7 +24,7 @@ export default function RootLayout() { return ( - + { + if (Platform.OS == "android") { + NavigationBar.setBackgroundColorAsync("white"); + } + }, []); return ( - Haptics.selectionAsync()} /> + Haptics.selectionAsync()} /> ); @@ -79,7 +77,7 @@ function HeaderRight() { export default function Home() { return ( - + } /> - + ); } diff --git a/apps/mobile/app/dashboard/(tabs)/lists.tsx b/apps/mobile/app/dashboard/(tabs)/lists.tsx index e0ed8489..0350ebd2 100644 --- a/apps/mobile/app/dashboard/(tabs)/lists.tsx +++ b/apps/mobile/app/dashboard/(tabs)/lists.tsx @@ -1,9 +1,10 @@ import { useEffect, useState } from "react"; -import { FlatList, Pressable, SafeAreaView, Text, View } from "react-native"; +import { FlatList, Pressable, Text, View } from "react-native"; import { Link } from "expo-router"; import { api } from "@/lib/trpc"; import { ChevronRight } from "lucide-react-native"; import PageTitle from "@/components/ui/PageTitle"; +import CustomSafeAreaView from "@/components/ui/CustomSafeAreaView"; export default function Lists() { const [refreshing, setRefreshing] = useState(false); @@ -48,7 +49,7 @@ export default function Lists() { ); return ( - + @@ -62,7 +63,7 @@ export default function Lists() { {l.item.logo} {l.item.name} - + )} @@ -70,6 +71,6 @@ export default function Lists() { refreshing={refreshing} onRefresh={onRefresh} /> - + ); } diff --git a/apps/mobile/app/dashboard/(tabs)/search.tsx b/apps/mobile/app/dashboard/(tabs)/search.tsx index c1bb178b..bcaee5af 100644 --- a/apps/mobile/app/dashboard/(tabs)/search.tsx +++ b/apps/mobile/app/dashboard/(tabs)/search.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { SafeAreaView, View } from "react-native"; +import { View } from "react-native"; import BookmarkList from "@/components/bookmarks/BookmarkList"; import FullPageSpinner from "@/components/ui/FullPageSpinner"; import { Input } from "@/components/ui/Input"; @@ -7,6 +7,7 @@ import PageTitle from "@/components/ui/PageTitle"; import { api } from "@/lib/trpc"; import { keepPreviousData } from "@tanstack/react-query"; import { useDebounce } from "use-debounce"; +import CustomSafeAreaView from "@/components/ui/CustomSafeAreaView"; export default function Search() { const [search, setSearch] = useState(""); @@ -25,7 +26,7 @@ export default function Search() { } return ( - + - + ); } diff --git a/apps/mobile/app/dashboard/(tabs)/settings.tsx b/apps/mobile/app/dashboard/(tabs)/settings.tsx index f60c2495..0dbf7da6 100644 --- a/apps/mobile/app/dashboard/(tabs)/settings.tsx +++ b/apps/mobile/app/dashboard/(tabs)/settings.tsx @@ -1,8 +1,9 @@ -import { SafeAreaView, Text, View } from "react-native"; +import { Text, View } from "react-native"; import { Button } from "@/components/ui/Button"; import PageTitle from "@/components/ui/PageTitle"; import { useSession } from "@/lib/session"; import { api } from "@/lib/trpc"; +import CustomSafeAreaView from "@/components/ui/CustomSafeAreaView"; export default function Dashboard() { const { logout } = useSession(); @@ -14,7 +15,7 @@ export default function Dashboard() { } return ( - + @@ -25,6 +26,6 @@ export default function Dashboard() {