···811 maybe_instant = last_msg.localTime(&self.client.app.tz);
812 }
813814- var first_iter = true;
815 while (iter.next()) |msg| {
816- defer first_iter = false;
817 // Break if we have gone past the top of the screen
818 if (row < 0) break;
819···1008 // Check if we should print a "last read" line. If the next message we will print is
1009 // before the last_read, and this message is after the last_read then it is our border.
1010 // Before
1011- if (!first_iter and maybe_next_instant != null and maybe_instant != null) {
1012 const this = maybe_instant.?.unixTimestamp();
1013 const next = maybe_next_instant.?.unixTimestamp();
1014 if (this > self.last_read and next <= self.last_read) {
···2054 channel.has_unread_highlight = has_highlight;
2055 channel.has_unread = true;
2056 }
2057- }
2058-2059- // If we get a message from the current user mark the channel as
2060- // read, since they must have just sent the message.
2061- const sender: []const u8 = blk: {
2062- const src = msg2.source() orelse break :blk "";
2063- const l = std.mem.indexOfScalar(u8, src, '!') orelse
2064- std.mem.indexOfScalar(u8, src, '@') orelse
2065- src.len;
2066- break :blk src[0..l];
2067- };
2068- if (std.mem.eql(u8, sender, client.nickname())) {
2069- self.app.markSelectedChannelRead();
2070 }
2071 },
2072 }
···811 maybe_instant = last_msg.localTime(&self.client.app.tz);
812 }
8130814 while (iter.next()) |msg| {
0815 // Break if we have gone past the top of the screen
816 if (row < 0) break;
817···1006 // Check if we should print a "last read" line. If the next message we will print is
1007 // before the last_read, and this message is after the last_read then it is our border.
1008 // Before
1009+ if (maybe_next_instant != null and maybe_instant != null) {
1010 const this = maybe_instant.?.unixTimestamp();
1011 const next = maybe_next_instant.?.unixTimestamp();
1012 if (this > self.last_read and next <= self.last_read) {
···2052 channel.has_unread_highlight = has_highlight;
2053 channel.has_unread = true;
2054 }
2055+ // If we get a message from the current user mark the channel as
2056+ // read, since they must have just sent the message.
2057+ const sender: []const u8 = blk: {
2058+ const src = msg2.source() orelse break :blk "";
2059+ const l = std.mem.indexOfScalar(u8, src, '!') orelse
2060+ std.mem.indexOfScalar(u8, src, '@') orelse
2061+ src.len;
2062+ break :blk src[0..l];
2063+ };
2064+ if (std.mem.eql(u8, sender, client.nickname())) {
2065+ self.app.markSelectedChannelRead();
2066+ }
02067 }
2068 },
2069 }