diff options
author | xengineering <me@xengineering.eu> | 2022-08-17 12:53:29 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2022-08-19 12:13:49 +0200 |
commit | e6667aed7aaa5e60b3ded91aa5a6c28bf6da3314 (patch) | |
tree | 8e61c3ad3aa701cc13fca1f6f33e8eb95d932f63 /data.c | |
parent | c584fa579ab1ce12e162580a6e443b9035dd3f88 (diff) | |
download | limox-e6667aed7aaa5e60b3ded91aa5a6c28bf6da3314.tar limox-e6667aed7aaa5e60b3ded91aa5a6c28bf6da3314.tar.zst limox-e6667aed7aaa5e60b3ded91aa5a6c28bf6da3314.zip |
Implement roster to chat view transition
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -64,3 +64,24 @@ void add_roster_item(const char* jid, const char* subscription, const char* name item->page_widget = gui_add_chat(); } + +void* data_get_chat_page(void* roster_item_widget) { + + if (roster == NULL) { + printf("Empty roster!\n"); + exit(1); + } else { + roster_item_t* current = roster; + while (1) { + if (current->widget == roster_item_widget) { + return current->page_widget; + } + if (current->next == NULL) { + printf("Could not find matching roster item!\n"); + exit(1); + } + current = current->next; + } + } + +} |