Move and rename DashboardInputEvent->InputEvent

This commit is contained in:
James Babcock committed 2026-08-30 13:02:44 -07:00
1 parent 3e8be93833
commit 80d688dd4e
51 files changed
+299 -361

No files matched your search

+5 -4
View File
@@ -15,7 +15,8 @@ import {
statPath,
type DirectoryEntry,
} from "../../native/file-access";
import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
import { type InputEvent } from "../../ui/gestures";
import { Layer, type LayerContext } from "../../ui/layers";
const LIST_X = 20;
@@ -231,7 +232,7 @@ export class FileBrowserLayer implements Layer {
}
}
async handleInput(event: DashboardInputEvent, ctx: LayerContext): Promise<void> {
async handleInput(event: InputEvent, ctx: LayerContext): Promise<void> {
if (filesViewModeSetting.get() === "list") {
await this.handleListInput(event, ctx);
} else {
@@ -239,7 +240,7 @@ export class FileBrowserLayer implements Layer {
}
}
private async handleListInput(event: DashboardInputEvent, ctx: LayerContext): Promise<void> {
private async handleListInput(event: InputEvent, ctx: LayerContext): Promise<void> {
const rows = this.flatRows();
switch (event.type) {
case "scroll-up":
@@ -261,7 +262,7 @@ export class FileBrowserLayer implements Layer {
}
}
private async handleIconsInput(event: DashboardInputEvent, ctx: LayerContext): Promise<void> {
private async handleIconsInput(event: InputEvent, ctx: LayerContext): Promise<void> {
const rows = this.flatRows();
const iconRows = buildIconRows(rows);
this.selectedRow = clamp(this.selectedRow, 0, Math.max(0, iconRows.length - 1));