File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2493,12 +2493,17 @@ void DiscordInstance::HandleREADY(Json& j)
24932493 // select the first guild, if possible
24942494 Snowflake guildsf = 0 ;
24952495
2496+ bool forceRefresh = false ;
24962497 if (firstReadyOnThisUser) {
24972498 m_CurrentChannel = 0 ;
24982499
24992500 auto list = m_guildItemList.GetItems ();
2500- if (list->size () > 0 )
2501+ if (list->size () > 0 ) {
25012502 guildsf = list->front ()->GetID ();
2503+ }
2504+ else {
2505+ forceRefresh = true ;
2506+ }
25022507 }
25032508 else {
25042509 guildsf = m_CurrentGuild;
@@ -2507,6 +2512,9 @@ void DiscordInstance::HandleREADY(Json& j)
25072512 GetFrontend ()->RepaintGuildList ();
25082513 OnSelectGuild (guildsf);
25092514
2515+ if (forceRefresh)
2516+ GetFrontend ()->UpdateSelectedGuild ();
2517+
25102518 // Doing this because the contents of all channels might be outdated.
25112519 GetMessageCache ()->ClearAllChannels ();
25122520 GetFrontend ()->UpdateSelectedChannel ();
You can’t perform that action at this time.
0 commit comments