Skip to content

Commit

Permalink
fix: populating when reporting accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr committed Feb 20, 2024
1 parent 9c420da commit 9ab62da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Dialogs/Report.vala
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public class Tuba.Dialogs.Report : Adw.Window {
Category category = Category.OTHER;
check_buttons.foreach (e => {
if (((Gtk.CheckButton) e.value).active) {
category = (Category) e.key
category = (Category) e.key;
return false;
}

Expand Down Expand Up @@ -428,7 +428,7 @@ public class Tuba.Dialogs.Report : Adw.Window {
}
}

private void populate_posts (string account_id, string status_id) {
private void populate_posts (string account_id, string? status_id = null) {
new Request.GET (@"/api/v1/accounts/$(account_id)/statuses")
.with_param ("exclude_replies", "false")
.with_param ("exclude_reblogs", "true")
Expand All @@ -444,7 +444,7 @@ public class Tuba.Dialogs.Report : Adw.Window {

Network.parse_array (parser, node => {
var status = API.Status.from (node);
if (status.id == status_id) return;
if (status_id != null && status.id == status_id) return;
status.spoiler_text = null;
status.tuba_spoiler_revealed = true;
status.sensitive = false;
Expand Down

0 comments on commit 9ab62da

Please sign in to comment.