diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-06-10 15:27:32 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-06-10 15:27:32 -0400 |
commit | efc97aa2b0d7a4d63a2e6219070919559a0cf64d (patch) | |
tree | 9bdead11af29488095fe1e16261f58055d736c5b /components/chatmessage.hpp | |
parent | c73b08e341bb192936eff14ae5ba6ced18b20137 (diff) | |
download | abaddon-portaudio-efc97aa2b0d7a4d63a2e6219070919559a0cf64d.tar.gz abaddon-portaudio-efc97aa2b0d7a4d63a2e6219070919559a0cf64d.zip |
reduce db access + refactor
Diffstat (limited to 'components/chatmessage.hpp')
-rw-r--r-- | components/chatmessage.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/chatmessage.hpp b/components/chatmessage.hpp index 6074b20..4adb0a4 100644 --- a/components/chatmessage.hpp +++ b/components/chatmessage.hpp @@ -10,7 +10,7 @@ public: std::string Nonce; ChatMessageItemContainer(); - static ChatMessageItemContainer *FromMessage(Snowflake id); + static ChatMessageItemContainer *FromMessage(const Message &data); // attributes = edited, deleted void UpdateAttributes(); @@ -20,7 +20,7 @@ public: protected: void AddClickHandler(Gtk::Widget *widget, std::string); - Gtk::TextView *CreateTextComponent(const Message *data); // Message.Content + Gtk::TextView *CreateTextComponent(const Message &data); // Message.Content void UpdateTextComponent(Gtk::TextView *tv); Gtk::Widget *CreateEmbedComponent(const EmbedData &data); // Message.Embeds[0] Gtk::Widget *CreateImageComponent(const std::string &proxy_url, const std::string &url, int inw, int inh); @@ -111,7 +111,7 @@ public: Snowflake ChannelID; Snowflake NewestID = 0; - ChatMessageHeader(const Message *data); + ChatMessageHeader(const Message &data); void AddContent(Gtk::Widget *widget, bool prepend); void UpdateNameColor(); std::vector<Gtk::Widget*> GetChildContent(); |