Skip to content

Commit

Permalink
fix(views): tabbedbase -> view of same label (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr authored Mar 8, 2024
1 parent a8bac72 commit 7f437a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Dialogs/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public class Tuba.Dialogs.MainWindow: Adw.ApplicationWindow, Saveable {
last_view != null
&& last_view.label == view.label
&& !view.allow_nesting
&& view.uid == last_view.uid
)
) return view;

Expand Down
1 change: 1 addition & 0 deletions src/Views/Base.vala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class Tuba.Views.Base : Adw.BreakpointBin {
public bool allow_nesting { get; set; default = false; }
public bool is_sidebar_item { get; set; default = false; }
public int badge_number { get; set; default = 0; }
public int uid { get; set; default = -1; }
protected SimpleActionGroup actions { get; set; default = new SimpleActionGroup (); }

private bool _show_back_button = true;
Expand Down
1 change: 1 addition & 0 deletions src/Views/Explore.vala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
public class Tuba.Views.Explore : Views.TabbedBase {
construct {
label = _("Explore");
uid = 1;

add_timeline_tab (_("Posts"), "tuba-chat-symbolic", "/api/v1/trends/statuses", typeof (API.Status));
add_timeline_tab (_("Hashtags"), "tuba-hashtag-symbolic", "/api/v1/trends/tags", typeof (API.Tag), _("No Hashtags"));
Expand Down

0 comments on commit 7f437a1

Please sign in to comment.