╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │950 } │ │951 │ │952 var self = Header{ .box = box, .tab_ids = tab_ids }; │ │812 - // the tab matching the incoming route's view is selected initially. │ │813 - const selected_index: usize = switch (session.data.current_page) { │ │814 - .repo_issues => |i| switch (i.view) { │ │815 - .results => 0, │ │816 - .tags => 1, │ │817 - }, │ │818 - else => 0, │ │819 - }; │ │820 - self.getFocus().child_id = self.tab_ids.keys()[selected_index]; │ │953 + // the tab matching the page's view is selected initially. │ │954 + self.getFocus().child_id = self.tab_ids.keys()[View.viewIndex(data.view)];│ │955 return self; │ │956 } │ │957 │ ╰───────────────────────────────────────────────────────────────────────────────────────╯