From 2ce259b9264d5bd6f1be28c1ab6d82b224b942f0 Mon Sep 17 00:00:00 2001 From: Evan Paterakis Date: Mon, 17 Jun 2024 19:51:35 +0300 Subject: [PATCH] fix(Timeline): double content changed calls --- src/Views/TabbedBase.vala | 14 -------------- src/Views/Timeline.vala | 4 +++- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Views/TabbedBase.vala b/src/Views/TabbedBase.vala index 73e501df2..0c0f3e478 100644 --- a/src/Views/TabbedBase.vala +++ b/src/Views/TabbedBase.vala @@ -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) { diff --git a/src/Views/Timeline.vala b/src/Views/Timeline.vala index ce4cab8b8..f688b96f2 100644 --- a/src/Views/Timeline.vala +++ b/src/Views/Timeline.vala @@ -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)