mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-02 19:42:51 +08:00
fix: preserve remembered browser identity on exit
This commit is contained in:
1 parent
96ba467d52
commit
cb3dbe4ca4
3 files changed
+24
-5
No files matched your search
@@ -1054,6 +1054,7 @@ export function useVoiceWebSocket() {
|
||||
|
||||
function disconnect(preserveConnection = false): void {
|
||||
connectionSequence++;
|
||||
const keepRememberedIdentity = lastConnection?.rememberIdentity === true;
|
||||
if (!preserveConnection) lastConnection = null;
|
||||
stopMicrophone();
|
||||
const socket = ws.value;
|
||||
@@ -1067,7 +1068,7 @@ export function useVoiceWebSocket() {
|
||||
state.reconnectFailed = false;
|
||||
state.tsClientId = 0;
|
||||
state.errorCode = "";
|
||||
identityMaterial.value = "";
|
||||
if (!keepRememberedIdentity) identityMaterial.value = "";
|
||||
members.length = 0;
|
||||
channels.length = 0;
|
||||
chatMessages.length = 0;
|
||||
|
||||
Reference in new issue
Block a user