diff --git a/backend/settings/settings.go b/backend/settings/settings.go index b6b8302f..2c484401 100644 --- a/backend/settings/settings.go +++ b/backend/settings/settings.go @@ -78,8 +78,8 @@ var Settings = &settings{ FavoriteMods: []string{}, ModFilters: SavedModFilters{ - Order: "Last updated", - Filter: "Compatible", + Order: "last-updated", + Filter: "compatible", }, RemoteNames: map[string]string{}, diff --git a/frontend/src/lib/store/modFiltersStore.ts b/frontend/src/lib/store/modFiltersStore.ts index 8c4d7401..f3d523bd 100644 --- a/frontend/src/lib/store/modFiltersStore.ts +++ b/frontend/src/lib/store/modFiltersStore.ts @@ -73,12 +73,12 @@ export type PartialMod = PartialSMRMod | OfflineMod | MissingMod; export const search = writable(''); export const order = bindingTwoWayNoExcept(orderByOptions[1], { - initialGet: async () => GetModFiltersOrder().then((i) => orderByOptions.find((o) => o.name === i) || orderByOptions[1]), + initialGet: async () => GetModFiltersOrder().then((i) => orderByOptions.find((o) => o.id === i) || orderByOptions[1]), }, { - updateFunction: async (o) => SetModFiltersOrder(o.name), + updateFunction: async (o) => SetModFiltersOrder(o.id), }); export const filter = bindingTwoWayNoExcept(filterOptions[0], { - initialGet: async () => GetModFiltersFilter().then((i) => filterOptions.find((o) => o.name === i) || filterOptions[0]), + initialGet: async () => GetModFiltersFilter().then((i) => filterOptions.find((o) => o.id === i) || filterOptions[0]), }, { - updateFunction: async (f) => SetModFiltersFilter(f.name), + updateFunction: async (f) => SetModFiltersFilter(f.id), });