This commit is contained in:
Fredrik Burmester
2024-08-18 17:10:31 +02:00
parent 21c1221138
commit 752cb1cdc6
13 changed files with 198 additions and 39 deletions

View File

@@ -1,6 +1,7 @@
import { atom, useAtom } from "jotai";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { useEffect } from "react";
import { getLocales } from "expo-localization";
type Settings = {
autoRotate?: boolean;
@@ -10,6 +11,7 @@ type Settings = {
deviceProfile?: "Expo" | "Native" | "Old";
forceDirectPlay?: boolean;
mediaListCollectionIds?: string[];
preferedLanguage?: string;
};
/**
@@ -33,6 +35,7 @@ const loadSettings = async (): Promise<Settings> => {
deviceProfile: "Expo",
forceDirectPlay: false,
mediaListCollectionIds: [],
preferedLanguage: getLocales()[0] || "en",
};
};