Skip to content

Commit

Permalink
* Fix redraw bug where loading message isn't cleared in empty channels.
Browse files Browse the repository at this point in the history
  • Loading branch information
iProgramMC committed May 16, 2024
1 parent 2e9b30c commit b6dd834
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/discord/DiscordInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ void DiscordInstance::OnSelectChannel(Snowflake sf, bool bSendSubscriptionUpdate
m_channelHistory.AddToHistory(m_CurrentChannel);
m_CurrentChannel = sf;

pGuild->m_currentChannel = m_CurrentChannel;

GetFrontend()->UpdateSelectedChannel();

if (!GetCurrentChannel() || !GetCurrentGuild())
Expand Down
13 changes: 5 additions & 8 deletions src/windows/MessageList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,16 +765,13 @@ void MessageList::RefetchMessages(Snowflake gapCulprit)
std::set<Snowflake> usersToLoad;

uint64_t ts = GetTimeUs();
if (gapCulprit)
for (auto iter = m_messages.begin(); iter != m_messages.end(); ++iter)
{
for (auto iter = m_messages.begin(); iter != m_messages.end(); ++iter)
if (gapCulprit == iter->m_msg.m_snowflake)
{
if (gapCulprit == iter->m_msg.m_snowflake)
{
updateRect = iter->m_rect;
haveUpdateRect = true;
break;
}
updateRect = iter->m_rect;
haveUpdateRect = true;
break;
}
}

Expand Down

0 comments on commit b6dd834

Please sign in to comment.