Skip to content

Commit 7c9fab4

Browse files
Fixes state provider after rebase
1 parent 052ed71 commit 7c9fab4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/webviews/apps/plus/composer/stateProvider.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@ export class ComposerStateProvider extends StateProviderBase<State, typeof state
5858
...this._state,
5959
generatingCommits: false,
6060
commits: msg.params.commits,
61-
hunks: this._state.hunks.map(hunk => ({
61+
hunks: (msg.params.hunks ?? this._state.hunks).map(hunk => ({
6262
...hunk,
6363
assigned: true,
6464
})),
6565
hasUsedAutoCompose: true,
6666
timestamp: Date.now(),
67+
recompose: this._state.recompose?.enabled
68+
? {
69+
...this._state.recompose,
70+
locked: false,
71+
}
72+
: this._state.recompose,
6773
};
6874

6975
(this as any)._state = updatedState;
@@ -143,6 +149,12 @@ export class ComposerStateProvider extends StateProviderBase<State, typeof state
143149
timestamp: Date.now(),
144150
hasUsedAutoCompose: false,
145151
repositoryState: msg.params.repositoryState,
152+
recompose: this._state.recompose?.enabled
153+
? {
154+
...this._state.recompose,
155+
locked: true,
156+
}
157+
: this._state.recompose,
146158
};
147159

148160
(this as any)._state = updatedState;

0 commit comments

Comments
 (0)