[V1] Fix NixOS Build

This commit is contained in:
Youwes09
2026-02-26 21:05:24 -06:00
parent 3d074a1fb1
commit 272d7673ce
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ fn patch_conf_key(mut text: String, key: &str, value: &str) -> String {
let replacement = format!("{key} = {value}"); let replacement = format!("{key} = {value}");
// Find a line that starts with the key (tolerant of surrounding whitespace) // Find a line that starts with the key (tolerant of surrounding whitespace)
if let Some(pos) = text.lines().position(|l| l.trim_start().starts_with(key)) { if let Some(pos) = text.lines().position(|l| l.trim_start().starts_with(key)) {
let mut lines: Vec<&str> = text.lines().collect(); let lines: Vec<&str> = text.lines().collect();
// We need an owned replacement; rebuild from scratch. // We need an owned replacement; rebuild from scratch.
let owned: Vec<String> = lines let owned: Vec<String> = lines
.iter() .iter()
+3 -3
View File
@@ -10,7 +10,7 @@ import {
ENQUEUE_DOWNLOAD, ENQUEUE_CHAPTERS_DOWNLOAD, ENQUEUE_DOWNLOAD, ENQUEUE_CHAPTERS_DOWNLOAD,
} from "../../lib/queries"; } from "../../lib/queries";
import { useStore, type FitMode } from "../../store"; import { useStore, type FitMode } from "../../store";
import { matchesKeybind, toggleFullscreen } from "../../lib/keybinds"; import { matchesKeybind, toggleFullscreen, DEFAULT_KEYBINDS, type Keybinds } from "../../lib/keybinds";
import s from "./Reader.module.css"; import s from "./Reader.module.css";
// ── Page cache (module-level, survives re-renders) ──────────────────────────── // ── Page cache (module-level, survives re-renders) ────────────────────────────
@@ -75,7 +75,7 @@ function decodeImage(url: string): Promise<void> {
return new Promise((resolve) => { return new Promise((resolve) => {
const img = new Image(); const img = new Image();
img.onload = () => { img.decode ? img.decode().then(resolve, resolve) : resolve(); }; img.onload = () => { img.decode ? img.decode().then(resolve, resolve) : resolve(); };
img.onerror = resolve; img.onerror = () => resolve();
img.src = url; img.src = url;
}); });
} }
@@ -638,7 +638,7 @@ export default function Reader() {
useEffect(() => { useEffect(() => {
const onKey = (e: KeyboardEvent) => { const onKey = (e: KeyboardEvent) => {
if ((e.target as HTMLElement).tagName === "INPUT") return; if ((e.target as HTMLElement).tagName === "INPUT") return;
const kb = settingsRef.current?.keybinds ?? {}; const kb: Keybinds = settingsRef.current?.keybinds ?? DEFAULT_KEYBINDS;
const maxW = settingsRef.current?.maxPageWidth ?? 900; const maxW = settingsRef.current?.maxPageWidth ?? 900;
const rtl = settingsRef.current?.readingDirection === "rtl"; const rtl = settingsRef.current?.readingDirection === "rtl";