╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │2815 // current root and builds the new page in a fresh arena; a back request │ │2816 // frees the current page and restores the previous one. when escape is │ │2817 // pressed with no history left we switch to the quit tab instead of quitting. │ │2868 - pub fn sync(self: *Nav, allocator: std.mem.Allocator, session: *Session) !void {│ │2818 + // returns whether the root was replaced. │ │2819 + pub fn sync(self: *Nav, allocator: std.mem.Allocator, session: *Session) !bool {│ │2820 // refresh: rebuild the current page in place from a current moment │ │2821 if (session.refresh_requested) { │ │2822 session.refresh_requested = false; │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────╮ │2823 try self.rebuild(allocator, session);│ │2873 - return; │ │2824 + return true; │ │2825 } │ │2826 │ │2827 if (session.back == .requested) { │ ╰───────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │2837 // a page built under another login is rebuilt rather than restored│ │2838 if (!std.meta.eql(entry.user_id, session.userId())) { │ │2839 try self.rebuild(allocator, session); │ │2889 - return; │ │2840 + return true; │ │2841 } │ │2842 chooseAnsiArtForNavigation(session); │ │2892 - return; │ │2843 + return true; │ │2844 } │ │2845 session.back = .unavailable; │ │2846 // nothing to go back to; switch to the quit confirmation │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │2865 else => {}, │ │2866 } │ │2867 } │ │2917 - return; │ │2868 + return false; │ │2869 } │ │2870 │ │2871 // forward navigation: navigate() set next_page to the page to move to (a│ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │2872 // cross-page link or tab change crossing pages) │ │2873 if (session.next_page) |route| { │ │2874 session.next_page = null; │ │2924 - if (session.haxy_moment == null and session.local == null) return; │ │2875 + if (session.haxy_moment == null and session.local == null) return false;│ │2876 const previous_route = session.data.current_page; │ │2877 // the page we navigated to becomes the current page │ │2878 session.data.current_page = route; │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────╮ │2894 self.root = new_root; │ │2895 self.arena = arena; │ │2896 self.user_id = session.userId();│ │2897 + return true; │ │2898 } │ │2899 + return false; │ │2900 } │ │2901 }; │ │2902 │ ╰──────────────────────────────────────────────────╯