refactor: migrate backend queue to SwitchDriver actor

This commit is contained in:
Slinetrac
2025-10-26 15:04:03 +08:00
parent de35fef450
commit ceec922887
4 changed files with 231 additions and 33 deletions
+7 -1
View File
@@ -81,6 +81,7 @@ type ProfileSwitchFinishedPayload = {
profileId: string;
success: boolean;
notify: boolean;
taskId: number;
};
type RustPanicPayload = {
@@ -695,7 +696,12 @@ const ProfilePage = () => {
const payload = event.payload;
if (!payload) return;
const { profileId, success, notify } = payload;
const { profileId, success, notify, taskId } = payload;
debugProfileSwitch("SWITCH_FINISHED", profileId, {
success,
taskId,
notify,
});
setManualActivatings((prev) => prev.filter((id) => id !== profileId));
if (success) {