╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ thread.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
2717 } 2718 }, 2719 } 2720 2721 const id_hex = std.fmt.bytesToHex(id, .lower); 2722 const route = ui.RoutablePage.repoEventsRoute(self.data.identity, .removed, event_kind, &id_hex) orelse return; 2723 try self.session.navigate(route); 2724 } 2725 2726 // return to the list. 2727 fn focusList(self: *This, index: usize, root_focus: *Focus) void { 2728 root_focus.setFocus(self.listScroll(index).getFocus().id); 2729 } 2730 2731 // cross to the header tabs above the stack. 2732 fn focusHeader(self: *This, root_focus: *Focus) void { 2733 root_focus.setFocus(self.box.children.keys()[header_index]); 2734 } 2735 2736 pub fn clearGrid(self: *This) void { 2737 self.box.clearGrid(); 2738 } 2739 2740 pub fn getGrid(self: This) ?Grid { 2741 return self.box.getGrid(); 2742 } 2743 2744 pub fn getFocus(self: *This) *Focus { 2745 return self.box.getFocus(); 2746 } 2747 2748 // for the parent's "scroll up at the top jumps to the header" check: at the 2749 // top only while the header tabs hold focus, so up from the split 2750 // crosses into the tabs first. 2751 pub fn atTop(self: *This) bool { 2752 return self.headerActive(); 2753 } 2754 }; 2755 } 2756