don't play animation if you disconnect a single client
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
sendCommand,
|
||||
requestPreview,
|
||||
requestThumbnail,
|
||||
markManualDisconnect,
|
||||
} from "./data.js";
|
||||
import { initCountryPicker } from "./country-picker.js";
|
||||
|
||||
@@ -620,6 +621,7 @@ bulkDisconnectBtn?.addEventListener("click", async () => {
|
||||
|
||||
let success = 0;
|
||||
for (const clientId of selectedClients) {
|
||||
markManualDisconnect(clientId);
|
||||
const ok = await sendCommand(clientId, "disconnect");
|
||||
if (ok) success++;
|
||||
}
|
||||
@@ -976,6 +978,10 @@ menu.addEventListener("click", async (e) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (action === "disconnect") {
|
||||
markManualDisconnect(contextCard);
|
||||
}
|
||||
|
||||
const ok = await sendCommand(contextCard, action);
|
||||
if (ok) {
|
||||
setTimeout(() => loadWithOptions({ force: true }), 400);
|
||||
|
||||
Reference in New Issue
Block a user