⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
center nothing found
daniel31x137844a7fea0e0
diff --git a/apps/mobile/app/(tabs)/collections/index.tsx b/apps/mobile/app/(tabs)/collections/index.tsxindex c14b050c..f8be135c 100644--- a/apps/mobile/app/(tabs)/collections/index.tsx+++ b/apps/mobile/app/(tabs)/collections/index.tsx@@ -1,4 +1,11 @@-import { View, FlatList, Text, ActivityIndicator } from "react-native";+import {+ View,+ FlatList,+ Text,+ ActivityIndicator,+ ScrollView,+ StyleSheet,+} from "react-native";import useAuthStore from "@/store/auth";import CollectionListing from "@/components/CollectionListing";import { useLocalSearchParams } from "expo-router";@@ -29,6 +36,15 @@ export default function CollectionsScreen() {setFilteredCollections(filter);}, [search, collections.data]);+ const refreshControl = (+ <Spinner+ refreshing={collections.isRefetching}+ onRefresh={() => collections.refetch()}+ progressBackgroundColor={rawTheme[colorScheme as ThemeName]["base-200"]}+ colors={[rawTheme[colorScheme as ThemeName]["base-content"]]}+ />+ );+return (<ViewclassName="h-full bg-base-100"@@ -40,21 +56,33 @@ export default function CollectionsScreen() {<ActivityIndicator size="large" /><Text className="text-base mt-2.5 text-neutral">Loading...</Text></View>+ ) : filteredCollections.length === 0 ? (+ <View style={{ flex: 1 }}>+ <ScrollView+ style={StyleSheet.absoluteFill}+ contentContainerStyle={{ flexGrow: 1 }}+ contentInsetAdjustmentBehavior="never"+ showsVerticalScrollIndicator={false}+ refreshControl={refreshControl}+ />+ <View+ pointerEvents="none"+ style={[+ StyleSheet.absoluteFill,+ { justifyContent: "center", alignItems: "center" },+ ]}+ >+ <Text className="text-center text-xl text-neutral">+ Nothing found...+ </Text>+ </View>+ </View>) : (<FlatListcontentInsetAdjustmentBehavior="automatic"ListHeaderComponent={() => <></>}data={filteredCollections}- refreshControl={- <Spinner- refreshing={collections.isRefetching}- onRefresh={() => collections.refetch()}- progressBackgroundColor={- rawTheme[colorScheme as ThemeName]["base-200"]- }- colors={[rawTheme[colorScheme as ThemeName]["base-content"]]}- />- }+ refreshControl={refreshControl}refreshing={collections.isRefetching}initialNumToRender={4}keyExtractor={(item) => item.id?.toString() || ""}@@ -63,13 +91,6 @@ export default function CollectionsScreen() {ItemSeparatorComponent={() => (<View className="bg-neutral-content h-px" />)}- ListEmptyComponent={- <View className="flex justify-center py-10 items-center">- <Text className="text-center text-xl text-neutral">- Nothing found...- </Text>- </View>- }/>)}</View>diff --git a/apps/mobile/app/(tabs)/tags/index.tsx b/apps/mobile/app/(tabs)/tags/index.tsxindex 953abdb2..3608ae35 100644--- a/apps/mobile/app/(tabs)/tags/index.tsx+++ b/apps/mobile/app/(tabs)/tags/index.tsx@@ -1,4 +1,11 @@-import { View, FlatList, Text, ActivityIndicator } from "react-native";+import {+ View,+ FlatList,+ Text,+ ActivityIndicator,+ ScrollView,+ StyleSheet,+} from "react-native";import useAuthStore from "@/store/auth";import TagListing from "@/components/TagListing";import { useLocalSearchParams } from "expo-router";@@ -48,6 +55,15 @@ export default function TagsScreen() {return tags.data.filter((tag) => tag.name.toLowerCase().includes(q));}, [searchQuery, tags.data]);+ const refreshControl = (+ <Spinner+ refreshing={tags.isRefetching}+ onRefresh={() => resetInfiniteQueryPagination(queryClient, ["tags"])}+ progressBackgroundColor={rawTheme[colorScheme as ThemeName]["base-200"]}+ colors={[rawTheme[colorScheme as ThemeName]["base-content"]]}+ />+ );+return (<ViewclassName="h-full bg-base-100"@@ -59,23 +75,35 @@ export default function TagsScreen() {<ActivityIndicator size="large" /><Text className="text-base mt-2.5 text-neutral">Loading...</Text></View>+ ) : (filteredTags?.length ?? 0) === 0 ? (+ <View style={{ flex: 1 }}>+ <ScrollView+ style={StyleSheet.absoluteFill}+ contentContainerStyle={{ flexGrow: 1 }}+ contentInsetAdjustmentBehavior="never"+ showsVerticalScrollIndicator={false}+ refreshControl={refreshControl}+ />+ {!tags.isFetching && (+ <View+ pointerEvents="none"+ style={[+ StyleSheet.absoluteFill,+ { justifyContent: "center", alignItems: "center" },+ ]}+ >+ <Text className="text-center text-xl text-neutral">+ Nothing found...+ </Text>+ </View>+ )}+ </View>) : (<FlatListcontentInsetAdjustmentBehavior="automatic"ListHeaderComponent={() => <></>}data={filteredTags}- refreshControl={- <Spinner- refreshing={tags.isRefetching}- onRefresh={() =>- resetInfiniteQueryPagination(queryClient, ["tags"])- }- progressBackgroundColor={- rawTheme[colorScheme as ThemeName]["base-200"]- }- colors={[rawTheme[colorScheme as ThemeName]["base-content"]]}- />- }+ refreshControl={refreshControl}refreshing={tags.isRefetching}initialNumToRender={4}keyExtractor={(item) => item.id?.toString() || ""}@@ -95,15 +123,6 @@ export default function TagsScreen() {</View>) : null}- ListEmptyComponent={- tags.isFetching ? null : (- <View className="flex justify-center py-10 items-center">- <Text className="text-center text-xl text-neutral">- Nothing found...- </Text>- </View>- )- }/>)}</View>diff --git a/apps/mobile/components/Links.tsx b/apps/mobile/components/Links.tsxindex 33f80112..71c2c893 100644--- a/apps/mobile/components/Links.tsx+++ b/apps/mobile/components/Links.tsx@@ -4,6 +4,8 @@ import {Text,ActivityIndicator,ViewToken,+ ScrollView,+ StyleSheet,} from "react-native";import LinkListing from "@/components/LinkListing";import React, { useState } from "react";@@ -31,30 +33,51 @@ export default function Links({ links, data }: Props) {const queryClient = useQueryClient();const [promptedRefetch, setPromptedRefetch] = useState(false);+ const refreshControl = (+ <Spinner+ refreshing={data.isRefetching && promptedRefetch}+ onRefresh={async () => {+ setPromptedRefetch(true);+ await resetInfiniteQueryPagination(queryClient, ["links"]);+ setPromptedRefetch(false);+ }}+ progressBackgroundColor={rawTheme[colorScheme as ThemeName]["base-200"]}+ colors={[rawTheme[colorScheme as ThemeName]["base-content"]]}+ />+ );+return data.isLoading ? (<View className="flex justify-center h-screen items-center"><ActivityIndicator size="large" /><Text className="text-base mt-2.5 text-neutral">Loading...</Text></View>+ ) : (links?.length ?? 0) === 0 ? (+ <View style={{ flex: 1 }}>+ <ScrollView+ style={StyleSheet.absoluteFill}+ contentContainerStyle={{ flexGrow: 1 }}+ contentInsetAdjustmentBehavior="never"+ showsVerticalScrollIndicator={false}+ refreshControl={refreshControl}+ />+ <View+ pointerEvents="none"+ style={[+ StyleSheet.absoluteFill,+ { justifyContent: "center", alignItems: "center" },+ ]}+ >+ <Text className="text-center text-xl text-neutral">+ Nothing found...+ </Text>+ </View>+ </View>) : (<FlatListcontentInsetAdjustmentBehavior="automatic"ListHeaderComponent={() => <></>}data={links || []}- refreshControl={- <Spinner- refreshing={data.isRefetching && promptedRefetch}- onRefresh={async () => {- setPromptedRefetch(true);- await resetInfiniteQueryPagination(queryClient, ["links"]);- setPromptedRefetch(false);- }}- progressBackgroundColor={- rawTheme[colorScheme as ThemeName]["base-200"]- }- colors={[rawTheme[colorScheme as ThemeName]["base-content"]]}- />- }+ refreshControl={refreshControl}refreshing={data.isRefetching && promptedRefetch}initialNumToRender={4}keyExtractor={(item) => item.id?.toString() || ""}@@ -66,13 +89,6 @@ export default function Links({ links, data }: Props) {ItemSeparatorComponent={() => (<View className="bg-neutral-content h-px" />)}- ListEmptyComponent={- <View className="flex justify-center py-10 items-center">- <Text className="text-center text-xl text-neutral">- Nothing found...- </Text>- </View>- }ListFooterComponent={data.isFetchingNextPage ? (<View className="py-4 items-center">