diff options
| author | xuatz <xzlow10@gmail.com> | 2025-07-17 17:24:33 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-17 09:24:33 +0100 |
| commit | fe69ca8ce88b51b0117aebfbb512fef16b4ebb35 (patch) | |
| tree | 32b8e96940b8a9de1ffe433347f95f33a47a8614 /apps/mobile/app/dashboard/bookmarks | |
| parent | a3627569466677d3c0f585af3e04b7ce7a14249f (diff) | |
| download | karakeep-fe69ca8ce88b51b0117aebfbb512fef16b4ebb35.tar.zst | |
feat(mobile): Add user setting for default bookmark view mode (#1723)
* feat(mobile): add user setting for default bookmark view mode
* regen db migration script
* clean up implementation
* Update docs/docs/07-Development/01-setup.md
* Update GEMINI.md
* use local setting instead of storing value in db
* improve start-dev.sh to also handle for db migration
* rename mobileBookmarkClickDefaultViewMode to defaultBookmarkView for consistency
Diffstat (limited to 'apps/mobile/app/dashboard/bookmarks')
| -rw-r--r-- | apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx b/apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx index 00954dd8..eafcfc19 100644 --- a/apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx +++ b/apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { Alert, Keyboard, @@ -27,6 +27,7 @@ import FullPageSpinner from "@/components/ui/FullPageSpinner"; import { Input } from "@/components/ui/Input"; import { useToast } from "@/components/ui/Toast"; import { useAssetUrl } from "@/lib/hooks"; +import useAppSettings from "@/lib/settings"; import { api } from "@/lib/trpc"; import { MenuView } from "@react-native-menu/menu"; import { @@ -378,9 +379,11 @@ export default function ListView() { const { slug } = useLocalSearchParams(); const { colorScheme } = useColorScheme(); const isDark = colorScheme === "dark"; + const { settings } = useAppSettings(); - const [bookmarkLinkType, setBookmarkLinkType] = - useState<BookmarkLinkType>("browser"); + const [bookmarkLinkType, setBookmarkLinkType] = useState<BookmarkLinkType>( + settings.defaultBookmarkView, + ); if (typeof slug !== "string") { throw new Error("Unexpected param type"); |
