From 40fd76d5b992fb868b44a6f76152655a0408e37b Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Tue, 12 Sep 2023 09:38:16 -0400 Subject: 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. --- src/list_item.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/list_item.cpp') 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; } -- cgit v1.2.3-54-g00ecf