mirror of
https://github.com/voideditor/void
synced 2026-05-24 01:48:25 +00:00
goto next diff after accept/reject
This commit is contained in:
parent
8816c7194d
commit
c5862188cb
1 changed files with 13 additions and 2 deletions
|
|
@ -598,8 +598,13 @@ registerAction2(class extends Action2 {
|
|||
if (!diffid) return;
|
||||
|
||||
metricsService.capture('Accept Diff', { diffid, keyboard: true });
|
||||
editCodeService.acceptDiff({ diffid: parseInt(diffid) })
|
||||
editCodeService.acceptDiff({ diffid: parseInt(diffid) });
|
||||
|
||||
// After accepting the diff, navigate to the next diff
|
||||
const nextDiffIdx = commandBarService.getNextDiffIdx(1);
|
||||
if (nextDiffIdx !== null) {
|
||||
commandBarService.goToDiffIdx(nextDiffIdx);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -635,7 +640,13 @@ registerAction2(class extends Action2 {
|
|||
if (!diffid) return;
|
||||
|
||||
metricsService.capture('Reject Diff', { diffid, keyboard: true });
|
||||
editCodeService.rejectDiff({ diffid: parseInt(diffid) })
|
||||
editCodeService.rejectDiff({ diffid: parseInt(diffid) });
|
||||
|
||||
// After rejecting the diff, navigate to the next diff
|
||||
const nextDiffIdx = commandBarService.getNextDiffIdx(1);
|
||||
if (nextDiffIdx !== null) {
|
||||
commandBarService.goToDiffIdx(nextDiffIdx);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue