chore: simplify code formatting and remove unnecessary code

This commit is contained in:
Pavel Laptev 2024-02-11 20:42:29 +01:00 committed by GitButler
parent 5e6d5c466b
commit 22c6b7813c
3 changed files with 4 additions and 11 deletions

View File

@ -50,10 +50,7 @@
let rsViewport: HTMLElement;
const userSettings = getContext<SettingsStore>(SETTINGS_CONTEXT);
const defaultBranchWidthRem = persisted<number | undefined>(
24,
'defaulBranchWidth' + project.id
);
const defaultBranchWidthRem = persisted<number | undefined>(24, 'defaulBranchWidth' + project.id);
const laneWidthKey = 'laneWidth_';
let laneWidth: number;

View File

@ -103,9 +103,7 @@
selectable={$commitBoxOpen && !isUnapplied}
on:close={() => {
const selectedId = selected?.id;
selectedFiles.update((fileIds) =>
fileIds.filter((file) => file.id != selectedId)
);
selectedFiles.update((fileIds) => fileIds.filter((file) => file.id != selectedId));
}}
/>
<Resizer

View File

@ -56,10 +56,8 @@
{indeterminate}
on:change={(e) => {
selectedOwnership.update((ownership) => {
if (e.detail)
file.hunks.forEach((h) => ownership.addHunk(file.id, h.id));
if (!e.detail)
file.hunks.forEach((h) => ownership.removeHunk(file.id, h.id));
if (e.detail) file.hunks.forEach((h) => ownership.addHunk(file.id, h.id));
if (!e.detail) file.hunks.forEach((h) => ownership.removeHunk(file.id, h.id));
return ownership;
});
}}