diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2022-04-10 18:52:36 +0200 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2022-04-10 18:52:36 +0200 |
commit | 6e6a4f7f612c14fa0188eab6fc6e2906b717540b (patch) | |
tree | e1d4ccd620a9d6a25c72b4e56b2dd8530aa4f544 /src/contact.c | |
parent | 2533114fcc0fbfa3f3ee3c756892fec39fd547a4 (diff) | |
download | messenger-gtk-6e6a4f7f612c14fa0188eab6fc6e2906b717540b.tar.gz messenger-gtk-6e6a4f7f612c14fa0188eab6fc6e2906b717540b.zip |
Updated usage of member user pointers
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/contact.c')
-rw-r--r-- | src/contact.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/contact.c b/src/contact.c index 0ebe9c6..9c590a3 100644 --- a/src/contact.c +++ b/src/contact.c | |||
@@ -60,6 +60,29 @@ contact_destroy_info(struct GNUNET_CHAT_Contact *contact) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | void | 62 | void |
63 | contact_set_last_message_to_info(const struct GNUNET_CHAT_Contact *contact, | ||
64 | void *message) | ||
65 | { | ||
66 | MESSENGER_ContactInfo* info = GNUNET_CHAT_contact_get_user_pointer(contact); | ||
67 | |||
68 | if (!info) | ||
69 | return; | ||
70 | |||
71 | info->last_message = message; | ||
72 | } | ||
73 | |||
74 | void* | ||
75 | contact_get_last_message_from_info(const struct GNUNET_CHAT_Contact *contact) | ||
76 | { | ||
77 | MESSENGER_ContactInfo* info = GNUNET_CHAT_contact_get_user_pointer(contact); | ||
78 | |||
79 | if (!info) | ||
80 | return NULL; | ||
81 | |||
82 | return info->last_message; | ||
83 | } | ||
84 | |||
85 | void | ||
63 | contact_add_name_label_to_info(const struct GNUNET_CHAT_Contact *contact, | 86 | contact_add_name_label_to_info(const struct GNUNET_CHAT_Contact *contact, |
64 | GtkLabel *label) | 87 | GtkLabel *label) |
65 | { | 88 | { |