╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────╮ │src/ui/Repo/Undo.zig│ ╰────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │115 } │ │113 - │ │114 -const Batch = struct { index: u64, count: u64 }; │ │116 │ │116 -// the events the transaction's moment wrote, or null when it wrote none │ │117 -fn momentBatch(comptime opts: rp.RepoOpts(.xit), moment: rp.Repo(.xit, opts).DB.HashMap(.read_only)) !?Batch { │ │117 +// how many events the transaction's moment wrote, or null when it wrote none │ │118 +fn momentEventCount(comptime opts: rp.RepoOpts(.xit), moment: rp.Repo(.xit, opts).DB.HashMap(.read_only)) !?u64 { │ │119 const DB = rp.Repo(.xit, opts).DB; │ │120 const haxy_moment = evt.currentMomentFromRepoMoment(opts.hash, moment) catch return null; │ │121 const index_cursor = try haxy_moment.getCursor(hash.hashInt(opts.hash, evt.moment_index_key)) orelse return null;│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │121 - const moment_index = try index_cursor.readUint(); │ │122 - const ids = try evt.momentEventIds(DB, opts.hash, haxy_moment, moment_index) orelse return null; │ │123 - return .{ .index = moment_index, .count = try ids.count() }; │ │122 + const ids = try evt.momentEventIds(DB, opts.hash, haxy_moment, try index_cursor.readUint()) orelse return null;│ │123 + return try ids.count(); │ │124 } │ │125 │ │126 pub fn formatTimestamp(aa: std.mem.Allocator, timestamp: i64) ![]const u8 { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯