A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix(mobile): Scroll to the top when the main tab is clicked
MohamedBassemc4d722311586
diff --git a/apps/mobile/app.json b/apps/mobile/app.jsonindex f2a34cd0..927a94e1 100644--- a/apps/mobile/app.json+++ b/apps/mobile/app.json@@ -3,7 +3,7 @@"name": "Hoarder App","slug": "hoarder","scheme": "hoarder",- "version": "1.2.2",+ "version": "1.2.3","orientation": "portrait","icon": "./assets/icon.png","userInterfaceStyle": "light",diff --git a/apps/mobile/app/dashboard/(tabs)/lists.tsx b/apps/mobile/app/dashboard/(tabs)/lists.tsxindex 92ae1c93..2aece541 100644--- a/apps/mobile/app/dashboard/(tabs)/lists.tsx+++ b/apps/mobile/app/dashboard/(tabs)/lists.tsx@@ -1,5 +1,5 @@import { useEffect, useState } from "react";-import { FlatList, View } from "react-native";+import { FlatList, View, Text, Pressable } from "react-native";import { Link } from "expo-router";import { api } from "@/lib/trpc";import { ChevronRight } from "lucide-react-native";@@ -53,12 +53,14 @@ export default function Lists() {marginTop: 5,}}renderItem={(l) => (- <View className="mx-2 flex flex-row justify-between rounded-xl border border-gray-100 bg-white px-4 py-2">- <Link key={l.item.id} href={l.item.href} className="text-lg">- {l.item.logo} {l.item.name}- </Link>- <ChevronRight />- </View>+ <Link asChild key={l.item.id} href={l.item.href}>+ <Pressable className="mx-2 flex flex-row justify-between rounded-xl border border-gray-100 bg-white px-4 py-2">+ <Text className="text-lg">+ {l.item.logo} {l.item.name}+ </Text>+ <ChevronRight />+ </Pressable>+ </Link>)}data={links}refreshing={refreshing}diff --git a/apps/mobile/components/bookmarks/BookmarkList.tsx b/apps/mobile/components/bookmarks/BookmarkList.tsxindex e3c2bdb1..48272fb3 100644--- a/apps/mobile/components/bookmarks/BookmarkList.tsx+++ b/apps/mobile/components/bookmarks/BookmarkList.tsx@@ -1,10 +1,11 @@-import { useEffect, useState } from "react";+import { useEffect, useRef, useState } from "react";import { Text, View, Keyboard } from "react-native";import Animated, { LinearTransition } from "react-native-reanimated";import { api } from "@/lib/trpc";import FullPageSpinner from "../ui/FullPageSpinner";import BookmarkCard from "./BookmarkCard";+import { useScrollToTop } from '@react-navigation/native';export default function BookmarkList({favourited,@@ -17,6 +18,8 @@ export default function BookmarkList({}) {const apiUtils = api.useUtils();const [refreshing, setRefreshing] = useState(false);+ const flatListRef = useRef(null);+ useScrollToTop(flatListRef);const { data, isPending, isPlaceholderData } =api.bookmarks.getBookmarks.useQuery({favourited,@@ -39,6 +42,7 @@ export default function BookmarkList({return (<Animated.FlatList+ ref={flatListRef}itemLayoutAnimation={LinearTransition}contentContainerStyle={{gap: 15,