aboutsummaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorConfuSomu2023-02-25 15:58:21 -0500
committerConfuSomu2023-02-25 15:58:21 -0500
commit4579089fde7d3c64ed98767714700f30e243e7ae (patch)
treed1192bad0bec7003bd8b761a0a91d8021ff4b90a /src/mainwindow.cpp
parentbc0fc0bbf4557f66b8ee2ed82b1a8a4881b5856c (diff)
downloadActorViewer-4579089fde7d3c64ed98767714700f30e243e7ae.tar
ActorViewer-4579089fde7d3c64ed98767714700f30e243e7ae.tar.gz
ActorViewer-4579089fde7d3c64ed98767714700f30e243e7ae.zip
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.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp11
1 files changed, 8 insertions, 3 deletions
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<ListItem*>(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();