fix: apply game order to dailies and routines
Account creation order leaked into daily rows and routine groups even when the reader had arranged their games. Apply the shared display rule while preserving each game's server and task order.
This commit is contained in:
1 parent
2056630f67
commit
dd5d374422
8 files changed
+74
-8
No files matched your search
@@ -52,7 +52,7 @@ import {
|
||||
import { metaFor } from "../shared/games.ts";
|
||||
import { readGoal } from "../shared/goal.ts";
|
||||
import { isDaily, resolveDaily } from "../shared/daily.ts";
|
||||
import { orderGames } from "./state/gameOrder.ts";
|
||||
import { orderGameItems, orderGames } from "./state/gameOrder.ts";
|
||||
import { advanceFocus } from "./state/lens.ts";
|
||||
import { restorePrefsValue } from "./state/usePrefs.ts";
|
||||
import { readableAmounts } from "./state/useAmounts.ts";
|
||||
@@ -532,12 +532,12 @@ function ReaderContent({
|
||||
setSettingsPage(next);
|
||||
setPage("settings");
|
||||
};
|
||||
const accounts = Object.values(state.accounts).filter(
|
||||
const accounts = orderGameItems(Object.values(state.accounts).filter(
|
||||
(a) =>
|
||||
!a.retiredAt &&
|
||||
!prefs.hiddenGames.includes(a.game) &&
|
||||
(a.intent.events || Object.values(a.routines).some((r) => r.followed)),
|
||||
);
|
||||
), prefs.gameOrder, (game) => meta(game).name);
|
||||
const ordered = orderGames(
|
||||
[...new Set(accounts.map((a) => a.game))],
|
||||
prefs.gameOrder,
|
||||
|
||||
Reference in new issue
Block a user