From 4579089fde7d3c64ed98767714700f30e243e7ae Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Sat, 25 Feb 2023 15:58:21 -0500 Subject: Implement Announce activity support This commit adds support for listing Announce activities/reblogs in the status list. These can be hidden using the new "Show reblogs" action in the "View" menu. --- src/mainwindow.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3a2c5d2..26df799 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -75,7 +75,7 @@ void MainWindow::on_actionAbout_triggered(bool checked) { void MainWindow::on_listWidget_itemActivated(QListWidgetItem *item) { ListItem* casted = dynamic_cast(item); if (casted != nullptr) { - QString status_info = data_archive->get_html_status_info(casted->get_status_index(), ui->statusInfoText->width()); + QString status_info = data_archive->get_html_status_info(casted->get_status_index(), ui->statusInfoText->width(), casted->get_status_type()); ui->statusInfoText->setHtml(status_info); } } @@ -133,9 +133,9 @@ void MainWindow::relist_statuses() { void MainWindow::reset_view_filters() { if (ui->actionAll_toots->isChecked()) - view_filters = {true, true, true, true, view_filters.onlyWithAttachment}; + view_filters = {true, true, true, true, true, view_filters.onlyWithAttachment}; else - view_filters = {false, false, false, false, view_filters.onlyWithAttachment}; + view_filters = {false, false, false, false, view_filters.includeReblogs, view_filters.onlyWithAttachment}; } void MainWindow::on_actionAll_toots_triggered(bool checked) { @@ -191,6 +191,11 @@ void MainWindow::on_actionOnly_with_attachment_triggered(bool checked) { view_filters_changed = true; } +void MainWindow::on_actionReblogs_triggered(bool checked) { + view_filters.includeReblogs = checked; + view_filters_changed = true; +} + void MainWindow::on_menuView_aboutToHide() { if (view_filters_changed) relist_statuses(); -- cgit v1.2.3-54-g00ecf