big ol' impl of zustand for settings/family states

still need to move track player state over for non-react access to that
This commit is contained in:
austinried
2021-08-01 16:30:28 +09:00
parent ebc31e6d05
commit 8b17ebe9c2
26 changed files with 809 additions and 779 deletions
+6 -4
View File
@@ -3,10 +3,12 @@ import GradientScrollView from '@app/components/GradientScrollView'
import Header from '@app/components/Header'
import NothingHere from '@app/components/NothingHere'
import PressableOpacity from '@app/components/PressableOpacity'
import { useUpdateHomeLists } from '@app/hooks/music'
import { useActiveServerRefresh } from '@app/hooks/server'
import { AlbumListItem } from '@app/models/music'
import { homeListsAtom, homeListsUpdatingAtom, useUpdateHomeLists } from '@app/state/music'
import { useActiveServerRefresh } from '@app/state/server'
import { homeListTypesAtom } from '@app/state/settings'
import { homeListsAtom, homeListsUpdatingAtom } from '@app/state/music'
import { selectSettings } from '@app/state/settings'
import { useStore } from '@app/state/store'
import colors from '@app/styles/colors'
import font from '@app/styles/font'
import { GetAlbumListType } from '@app/subsonic/params'
@@ -75,7 +77,7 @@ const Category = React.memo<{
})
const Home = () => {
const types = useAtomValue(homeListTypesAtom)
const types = useStore(selectSettings.homeLists)
const lists = useAtomValue(homeListsAtom)
const updating = useAtomValue(homeListsUpdatingAtom)
const update = useUpdateHomeLists()