From 32e7df09d7e2a7dc6f0e211aa82b482f81b76481 Mon Sep 17 00:00:00 2001 From: Gauravjot Garaya Date: Tue, 29 Oct 2024 20:42:56 -0700 Subject: [PATCH] added sort to downloads screen --- app/(tabs)/downloaded.tsx | 24 +++++++++++++++--------- components/ui/Select.tsx | 2 +- store/settings.ts | 11 +++++++++++ 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/app/(tabs)/downloaded.tsx b/app/(tabs)/downloaded.tsx index 6303eb5..bce36cc 100644 --- a/app/(tabs)/downloaded.tsx +++ b/app/(tabs)/downloaded.tsx @@ -11,6 +11,8 @@ import * as WallpaperManager from "@/modules/wallpaper-manager"; import {fadingPulseAnimation} from "@/lib/animations/fading_pulse"; import {onChangeListener} from "../../modules/wallpaper-manager/index"; import LoadingSpinner from "@/components/ui/LoadingSpinner"; +import Select from "@/components/ui/Select"; +import {useSettingsStore} from "@/store/settings"; type WallpaperApplyState = { status: "idle" | "applying" | "applied" | "error"; @@ -18,8 +20,10 @@ type WallpaperApplyState = { }; export default function DownloadedWallpapersScreen() { + const store = useSettingsStore(); const [applyState, setApplyState] = React.useState({status: "idle", path: ""}); - const posts = useDownloadedWallpapersStore().files; + const flatListRef = React.useRef(null); + let posts = useDownloadedWallpapersStore().files; // Listeners React.useEffect(() => { @@ -43,19 +47,21 @@ export default function DownloadedWallpapersScreen() { - +