File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 66
66
if (affectedPaths ) {
67
67
untrack (() => {
68
68
changeSelection .retain (affectedPaths );
69
- // TODO: We need to make this consider all groups
70
- idSelection .retain (affectedPaths , { type: ' ungrouped' });
69
+ // TODO: Consider whether this is the best place for this to
70
+ // live.
71
+ idSelection .retain (affectedPaths );
71
72
});
72
73
}
73
74
});
Original file line number Diff line number Diff line change 7
7
type SelectedFile
8
8
} from '$lib/selection/key' ;
9
9
import { SvelteSet } from 'svelte/reactivity' ;
10
- import type { HunkGroup } from '$lib/hunks/diffService.svelte' ;
11
10
import type { StackService } from '$lib/stacks/stackService.svelte' ;
12
11
import type { WorktreeService } from '$lib/worktree/worktreeService.svelte' ;
13
12
@@ -136,13 +135,13 @@ export class IdSelection {
136
135
* current worktree changes. Note that this function is a special case
137
136
* for a particular key. It feels a bit out of place.
138
137
*/
139
- retain ( paths : string [ ] | undefined , group : HunkGroup ) {
138
+ retain ( paths : string [ ] | undefined ) {
140
139
if ( paths === undefined ) {
141
140
this . selections . clear ( ) ;
142
141
return ;
143
142
}
144
143
const removedFiles : SelectedFile [ ] = [ ] ;
145
- const worktreeSelection = this . selections . get ( selectionKey ( { type : 'worktree' , group } ) ) ;
144
+ const worktreeSelection = this . selections . get ( selectionKey ( { type : 'worktree' } ) ) ;
146
145
if ( ! worktreeSelection ) return ;
147
146
148
147
for ( const selectedFile of worktreeSelection . entries ) {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export function readKey(key: SelectedFileKey): SelectedFile {
77
77
}
78
78
}
79
79
80
- export function selectionKey ( id : SelectionId ) : SelectedFileKey {
80
+ export function selectionKey ( id : SelectionId | { type : 'worktree' } ) : SelectedFileKey {
81
81
switch ( id . type ) {
82
82
case 'commit' :
83
83
return `${ id . type } :${ id . commitId } ` as SelectedFileKey ;
You can’t perform that action at this time.
0 commit comments