diff --git a/app/js/tl/misskeyparse.js b/app/js/tl/misskeyparse.js index c5c1d94c..e79c7364 100644 --- a/app/js/tl/misskeyparse.js +++ b/app/js/tl/misskeyparse.js @@ -979,7 +979,7 @@ function goGoogle(id) { } var misskeyws = [] var misskeywsstate = [] -function connectMisskey(acct_id) { +function connectMisskey(acct_id, re) { var domain = localStorage.getItem("domain_" + acct_id); var at = localStorage.getItem("acct_" + acct_id + "_at"); var start = "wss://" + domain + @@ -1063,13 +1063,17 @@ function connectMisskey(acct_id) { console.error("Error closing " + tlid); console.error(error); misskeywsstate[wsid] = false - connectMisskey(acct_id) + if(!re){ + connectMisskey(acct_id, true) + } return false; }; misskeyws[wsid].onclose = function () { console.warn("Closing " + tlid); misskeywsstate[wsid] = false - connectMisskey(acct_id) + if(!re){ + connectMisskey(acct_id, true) + } return false; }; diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 2acf871a..c5296c69 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -55,7 +55,7 @@ function parseColumn(dontclose) { var domain = localStorage.getItem("domain_" + key); if (localStorage.getItem("mode_" + domain) == "misskey") { localStorage.removeItem("misskey_wss_" + key) - connectMisskey(key) + connectMisskey(key, false) } }); }