Skip to content

Commit efca297

Browse files
committed
optimize logic to fix #118
1 parent 4adf3d7 commit efca297

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

floating.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@
8181

8282
function stopper() {
8383
ipc.send("floating-conversation", { topic: "stop" });
84-
isWorking = !isWorking;
85-
if (isWorking) $("#stopper").html("<i class='iconfont icon-pause' aria-hidden='true'></i>");
86-
else $("#stopper").html("<i class='iconfont icon-play' aria-hidden='true'></i>");
8784
}
8885

8986
function skipper() {

timer.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,10 @@ <h3>
761761
backcheck();
762762
else
763763
ipc.send("alert", i18n.__("fail-to-withdraw"));
764-
} else if (message === "stop") stopper();
764+
} else if (message === "stop") {
765+
stopper();
766+
ipc.send("floating-conversation", { topic: "stop-sync", val: isClockWorking });
767+
}
765768
else if (message === "enter") floatingOpener();
766769
else if (message === "closed") hasFloating = false;
767770
});

0 commit comments

Comments
 (0)