mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-21 00:21:35 +03:00
chore: simplify code formatting and remove unnecessary code
This commit is contained in:
parent
5e6d5c466b
commit
22c6b7813c
@ -50,10 +50,7 @@
|
|||||||
let rsViewport: HTMLElement;
|
let rsViewport: HTMLElement;
|
||||||
|
|
||||||
const userSettings = getContext<SettingsStore>(SETTINGS_CONTEXT);
|
const userSettings = getContext<SettingsStore>(SETTINGS_CONTEXT);
|
||||||
const defaultBranchWidthRem = persisted<number | undefined>(
|
const defaultBranchWidthRem = persisted<number | undefined>(24, 'defaulBranchWidth' + project.id);
|
||||||
24,
|
|
||||||
'defaulBranchWidth' + project.id
|
|
||||||
);
|
|
||||||
const laneWidthKey = 'laneWidth_';
|
const laneWidthKey = 'laneWidth_';
|
||||||
|
|
||||||
let laneWidth: number;
|
let laneWidth: number;
|
||||||
|
@ -103,9 +103,7 @@
|
|||||||
selectable={$commitBoxOpen && !isUnapplied}
|
selectable={$commitBoxOpen && !isUnapplied}
|
||||||
on:close={() => {
|
on:close={() => {
|
||||||
const selectedId = selected?.id;
|
const selectedId = selected?.id;
|
||||||
selectedFiles.update((fileIds) =>
|
selectedFiles.update((fileIds) => fileIds.filter((file) => file.id != selectedId));
|
||||||
fileIds.filter((file) => file.id != selectedId)
|
|
||||||
);
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Resizer
|
<Resizer
|
||||||
|
@ -56,10 +56,8 @@
|
|||||||
{indeterminate}
|
{indeterminate}
|
||||||
on:change={(e) => {
|
on:change={(e) => {
|
||||||
selectedOwnership.update((ownership) => {
|
selectedOwnership.update((ownership) => {
|
||||||
if (e.detail)
|
if (e.detail) file.hunks.forEach((h) => ownership.addHunk(file.id, h.id));
|
||||||
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.removeHunk(file.id, h.id));
|
|
||||||
return ownership;
|
return ownership;
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user