diff options
author | ConfuSomu | 2023-09-12 09:38:16 -0400 |
---|---|---|
committer | ConfuSomu | 2023-09-12 09:38:16 -0400 |
commit | 40fd76d5b992fb868b44a6f76152655a0408e37b (patch) | |
tree | 6e7997fa25d0dfa12831fbed7577d6d7b1d81fdc /src/list_item.cpp | |
parent | 9c60bc8ce4a0990c228d2cd746791b88c41532b8 (diff) | |
download | ActorViewer-40fd76d5b992fb868b44a6f76152655a0408e37b.tar ActorViewer-40fd76d5b992fb868b44a6f76152655a0408e37b.tar.gz ActorViewer-40fd76d5b992fb868b44a6f76152655a0408e37b.zip |
Implement archive method for getting APActivity
This replaces the existing method that returns HTML with a method that
gives us an APActivity object, which is more precise and allows more
extension in the future.
Diffstat (limited to 'src/list_item.cpp')
-rw-r--r-- | src/list_item.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/list_item.cpp b/src/list_item.cpp index b235d2b..deead65 100644 --- a/src/list_item.cpp +++ b/src/list_item.cpp @@ -1,4 +1,5 @@ #include "list_item.h" +#include "src/activitypub/apactivity.h" #include "src/types.h" #define ICON_PATH_PREFIX "res/icons" @@ -50,5 +51,8 @@ StatusType StatusListItem::get_status_type() { } const QString StatusListItem::get_info_html(int text_zone_width, QLocale* locale) { - return data_archive->get_html_status_info(status_index, text_zone_width, status_type, locale); + APActivity* activity = data_archive->get_activity(status_index, {status_type}); + QString html = activity->get_html_render({text_zone_width, locale}); + delete activity; activity = nullptr; + return html; } |