Default fetch-more mode to auto
This commit is contained in:
@@ -68,7 +68,7 @@ function FeedPage() {
|
||||
// loaded window by 50 episodes. manual mode: Enter on the row. auto mode:
|
||||
// reaching the bottom row fetches automatically (see the effect below).
|
||||
const app = useAppStore();
|
||||
const fetchMoreMode = () => app.state().preferences.fetchMoreMode ?? "manual";
|
||||
const fetchMoreMode = () => app.state().preferences.fetchMoreMode ?? "auto";
|
||||
const showFetchMore = () => feedStore.hasMoreAcrossAll();
|
||||
// Total navigable rows: episodes + the optional Fetch More row.
|
||||
const rowCount = () => episodes().length + (showFetchMore() ? 1 : 0);
|
||||
|
||||
@@ -102,7 +102,7 @@ export function MyShowsPage() {
|
||||
// counterpart to the Feed page's row (which loads every feed). manual
|
||||
// mode: Enter on the row. auto mode: reaching the bottom row fetches
|
||||
// automatically (see the effect below).
|
||||
const fetchMoreMode = () => app.state().preferences.fetchMoreMode ?? "manual";
|
||||
const fetchMoreMode = () => app.state().preferences.fetchMoreMode ?? "auto";
|
||||
const showFetchMore = () =>
|
||||
depth() >= 1 &&
|
||||
!!drilledShowId() &&
|
||||
|
||||
@@ -211,10 +211,10 @@ export function usePreferencesItems(): SettingItem[] {
|
||||
kind: "select",
|
||||
display: () => (prefs().fetchMoreMode === "auto" ? "Auto" : "Manual"),
|
||||
help: () =>
|
||||
`How the Feed and per-show episode lists load older episodes.\nManual: a "[Fetch More]" button at the bottom of the list.\nAuto: fetches automatically when reaching the bottom.\nType: select\nDefault: manual\nCurrent: ${prefs().fetchMoreMode === "auto" ? "Auto" : "Manual"}\nCycle with j/k; Enter to apply.`,
|
||||
`How the Feed and per-show episode lists load older episodes.\nManual: a "[Fetch More]" button at the bottom of the list.\nAuto: fetches automatically when reaching the bottom.\nType: select\nDefault: auto\nCurrent: ${prefs().fetchMoreMode === "auto" ? "Auto" : "Manual"}\nCycle with j/k; Enter to apply.`,
|
||||
cycle: (dir) => {
|
||||
const modes: Array<"manual" | "auto"> = ["manual", "auto"];
|
||||
const idx = modes.indexOf(prefs().fetchMoreMode ?? "manual");
|
||||
const idx = modes.indexOf(prefs().fetchMoreMode ?? "auto");
|
||||
const next = modes[(idx + dir + modes.length) % modes.length];
|
||||
app.updatePreferences({ fetchMoreMode: next });
|
||||
},
|
||||
|
||||
@@ -43,7 +43,7 @@ const defaultPreferences: UserPreferences = {
|
||||
autoDownloadScope: "all",
|
||||
autoDownloadWhitelist: [],
|
||||
autoJumpToPlayer: true,
|
||||
fetchMoreMode: "manual",
|
||||
fetchMoreMode: "auto",
|
||||
refreshIntervalMinutes: 30,
|
||||
};
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ export type AppSettings = {
|
||||
visualizer: VisualizerSettings;
|
||||
};
|
||||
|
||||
/** How the Feed and per-show episode lists load older episodes (default: manual "[Fetch More]"). */
|
||||
/** How the Feed and per-show episode lists load older episodes (default: auto). */
|
||||
export type FetchMoreMode = "manual" | "auto";
|
||||
|
||||
/** Which shows the auto-download setting applies to (default: all). */
|
||||
@@ -107,7 +107,7 @@ export type UserPreferences = {
|
||||
autoDownloadWhitelist: string[];
|
||||
/** Jump to the Player view automatically when playback starts (default: true) */
|
||||
autoJumpToPlayer: boolean;
|
||||
/** Load older episodes from the Feed list: manual button or automatic at the bottom (default: manual). */
|
||||
/** Load older episodes from the Feed list: manual button or automatic at the bottom (default: auto). */
|
||||
fetchMoreMode: FetchMoreMode;
|
||||
/** Minutes between automatic background feed refreshes (default: 30). */
|
||||
refreshIntervalMinutes: number;
|
||||
|
||||
@@ -47,7 +47,7 @@ const defaultPreferences: UserPreferences = {
|
||||
autoDownloadScope: "all",
|
||||
autoDownloadWhitelist: [],
|
||||
autoJumpToPlayer: true,
|
||||
fetchMoreMode: "manual",
|
||||
fetchMoreMode: "auto",
|
||||
refreshIntervalMinutes: 30,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user