Skip to content

Commit

Permalink
Fix mod filters selection
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Jul 4, 2024
1 parent 9523c85 commit 59b281f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions backend/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/lib/store/modFiltersStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});

0 comments on commit 59b281f

Please sign in to comment.