diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-04 00:48:38 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-04 00:48:38 -0400 |
commit | f69b0e61558680d9fdcaafd5c184b2c45fc06fce (patch) | |
tree | 87499f456700f365eb04cb19772f75f08eed614b /abaddon.cpp | |
parent | 6c04a0a86d832217dc6d08652430cd84b09ff1db (diff) | |
download | abaddon-portaudio-f69b0e61558680d9fdcaafd5c184b2c45fc06fce.tar.gz abaddon-portaudio-f69b0e61558680d9fdcaafd5c184b2c45fc06fce.zip |
pass around snowflake instead of MessageData
Diffstat (limited to 'abaddon.cpp')
-rw-r--r-- | abaddon.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/abaddon.cpp b/abaddon.cpp index ef0580d..56a211f 100644 --- a/abaddon.cpp +++ b/abaddon.cpp @@ -172,9 +172,9 @@ void Abaddon::ActionListChannelItemClick(Snowflake id) { m_main_window->set_title(std::string(APP_TITLE) + " - #" + channel->Name); m_main_window->UpdateChatActiveChannel(id); if (m_channels_requested.find(id) == m_channels_requested.end()) { - m_discord.FetchMessagesInChannel(id, [this, id](const std::vector<MessageData> &msgs) { + m_discord.FetchMessagesInChannel(id, [this, id](const std::vector<Snowflake> &msgs) { if (msgs.size() > 0) { - m_oldest_listed_message[id] = msgs.back().ID; + m_oldest_listed_message[id] = msgs.back(); m_main_window->UpdateChatWindowContents(); } @@ -194,13 +194,13 @@ void Abaddon::ActionChatLoadHistory(Snowflake id) { m_channels_history_loading.insert(id); - m_discord.FetchMessagesInChannelBefore(id, m_oldest_listed_message[id], [this, id](const std::vector<MessageData> &msgs) { + m_discord.FetchMessagesInChannelBefore(id, m_oldest_listed_message[id], [this, id](const std::vector<Snowflake> &msgs) { m_channels_history_loading.erase(id); if (msgs.size() == 0) { m_channels_history_loaded.insert(id); } else { - m_oldest_listed_message[id] = msgs.back().ID; + m_oldest_listed_message[id] = msgs.back(); m_main_window->UpdateChatPrependHistory(msgs); } }); |