From 45544f64953a4d22f8beb3e30a77a281b7b4691b Mon Sep 17 00:00:00 2001 From: Natsumi Date: Thu, 3 Oct 2024 19:24:49 +1300 Subject: [PATCH] Fix current user randomUserColours, maybe --- html/src/app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/html/src/app.js b/html/src/app.js index c25f2950..149b3cdf 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -1430,7 +1430,9 @@ speechSynthesis.getVoices(); API.isLoggedIn = false; API.cachedUsers = new Map(); - API.currentUser = {}; + API.currentUser = { + $userColour: '' + }; API.currentTravelers = new Map(); API.$on('USER:CURRENT', function (args) { @@ -9127,6 +9129,12 @@ speechSynthesis.getVoices(); // USER:CURRENT에서 처리를 함 $app.refreshFriends(args.ref, args.origin); $app.updateOnlineFriendCoutner(); + + if ($app.randomUserColours) { + $app.getNameColour(this.currentUser.id).then((colour) => { + this.currentUser.$userColour = colour; + }); + } }); API.$on('FRIEND:ADD', function (args) {