Skip to content

Commit

Permalink
fix(Timeline): double content changed calls (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr authored Jun 17, 2024
1 parent b84b9a8 commit 11d029e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
14 changes: 0 additions & 14 deletions src/Views/TabbedBase.vala
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,11 @@ public class Tuba.Views.TabbedBase : Views.Base {
on_content_changed ();
}

// TODO: Why did I write this? What does it do??? Why does it crash????
public override void on_content_changed () {
// var empty = true;
foreach_tab (tab => {
// tab.visible = !tab.empty;
// if (tab.visible)
// empty = false;

tab.on_content_changed ();
});
base_status = null;

// if (empty) {
// state = "status";
// status_title = STATUS_EMPTY;
// }
// else {
// state = "content";
// }
}

public override void scroll_page (bool up = false) {
Expand Down
4 changes: 3 additions & 1 deletion src/Views/Timeline.vala
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ public class Tuba.Views.Timeline : AccountHolder, Streamable, Views.ContentBase

if (headers != null)
get_pages (headers.get_one ("Link"));
on_content_changed ();

if (to_add.length == 0)
on_content_changed ();
on_request_finish ();
})
.on_error (on_error)
Expand Down

0 comments on commit 11d029e

Please sign in to comment.