Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified metadata/wordingkit-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified metadata/wordingkit-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified metadata/wordingkit-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions src/modes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,13 @@ function validateStoredModeDocument(value: unknown): StoredModeDocument {
if (!Array.isArray(value.modes)) {
throw damagedStorageError();
}
const language = value.language;

return {
version: MODE_STORAGE_VERSION,
language: value.language,
language,
sortMode: value.sortMode,
modes: value.modes.map((mode) =>
validateEditingMode(mode, value.language),
),
modes: value.modes.map((mode) => validateEditingMode(mode, language)),
};
} catch {
throw damagedStorageError();
Expand All @@ -210,7 +209,7 @@ function validateLegacyStoredModeDocument(
...(value.version === 2 && isSortMode(value.sortMode)
? { sortMode: value.sortMode }
: {}),
modes: value.modes.map(validateEditingMode),
modes: value.modes.map((mode) => validateEditingMode(mode)),
};
} catch {
throw damagedStorageError();
Expand Down Expand Up @@ -287,7 +286,7 @@ export async function loadModes(): Promise<EditingMode[]> {

export async function resetModes(): Promise<EditingMode[]> {
return queueMutation(async () => {
let language = DEFAULT_LANGUAGE;
let language: Language = DEFAULT_LANGUAGE;
try {
language = (await loadModeSettingsUnlocked()).language;
} catch {
Expand Down
2 changes: 1 addition & 1 deletion src/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default function Settings() {
);

const sortAction = (
<ActionPanel.Submenu title={ui.orderInRewrite} icon={Icon.Bars3BottomLeft}>
<ActionPanel.Submenu title={ui.orderInRewrite} icon={Icon.List}>
<Action
title={ui.customOrder}
icon={sortMode === "custom" ? Icon.Check : undefined}
Expand Down
Loading