From 80a658f062328ab8b47dc6b2557d274f51278b3a Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Tue, 12 Sep 2023 10:08:19 -0400 Subject: Define archive item ref type for Archive classes This type allows extension and the implementation of a more complete archive item reference system in the future as it allows going beyond ints. --- src/archive/mastodon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/archive/mastodon.cpp') diff --git a/src/archive/mastodon.cpp b/src/archive/mastodon.cpp index 238b861..50253c6 100644 --- a/src/archive/mastodon.cpp +++ b/src/archive/mastodon.cpp @@ -237,9 +237,9 @@ std::vector MastodonArchive::get_status_attachments_list(QJs return list; } -APActivity* MastodonArchive::get_activity(int status_index, Hinting_t hinting) { +APActivity* MastodonArchive::get_activity(ArchiveItemRef index, Hinting_t hinting) { // the JSON AP Activity - QJsonObject activity = outbox_items->at(status_index).toObject(); + QJsonObject activity = outbox_items->at(index).toObject(); APActivityFields act_fields = { .visibility = hinting.status_type @@ -334,9 +334,9 @@ APActivity* MastodonArchive::get_activity(int status_index, Hinting_t hinting) { } // TODO: make this use an APActivity object that will be present as an StatusListItem member. -const QString MastodonArchive::get_html_status_text(int status_index) { +const QString MastodonArchive::get_html_status_text(ArchiveItemRef index) { QString text(""); - QJsonObject obj = outbox_items->at(status_index).toObject(); + QJsonObject obj = outbox_items->at(index).toObject(); if (obj["object"].isObject()) { QJsonObject activity = obj["object"].toObject(); -- cgit v1.2.3-54-g00ecf