|
1 | 1 | import { buildCtxMenu, CtxItem } from '../../lib/menu'; |
2 | 2 | import { notify } from '../../lib/notify'; |
3 | 3 | import { TAURI } from '../../lib/tauri'; |
4 | | -import { state } from '../../state/state'; |
| 4 | +import { state, disableDefaultSelectAll } from '../../state/state'; |
5 | 5 | import type { FileStatus } from '../../types'; |
6 | 6 | import { openStashConfirm } from '../stashConfirm'; |
7 | 7 | import { dragState, listEl } from './context'; |
@@ -33,7 +33,7 @@ export function onFileClick(e: MouseEvent, file: FileStatus, index: number, visi |
33 | 33 | if (state.selectedFiles.has(p)) state.selectedFiles.delete(p); |
34 | 34 | else state.selectedFiles.add(p); |
35 | 35 | } |
36 | | - state.defaultSelectAll = false; |
| 36 | + disableDefaultSelectAll(); |
37 | 37 | updateSelectAllState(visible); |
38 | 38 | renderListAfterRangeSelect(file); |
39 | 39 | } else if (isToggle) { |
@@ -124,7 +124,7 @@ export function onFileMouseDown(e: MouseEvent, file: FileStatus, index: number, |
124 | 124 | } |
125 | 125 |
|
126 | 126 | export function applySelect(path: string, on: boolean, rowEl: HTMLElement | null, visible: FileStatus[], mode: 'diff' | 'commit') { |
127 | | - state.defaultSelectAll = false; |
| 127 | + disableDefaultSelectAll(); |
128 | 128 | if (mode === 'commit') { |
129 | 129 | if (on) state.selectedFiles.add(path); else state.selectedFiles.delete(path); |
130 | 130 | if (rowEl) rowEl.classList.toggle('picked', on); |
|
0 commit comments