an experimental irc client

fix: Don't mark current channel as read when clicking on it

This would cause the channel to be marked as read if you held down
your mouse button for a bit too long.

+1 -1
+1 -1
src/app.zig
··· 1558 .height = .{ .limit = 1 }, 1559 }); 1560 if (channel_win.hasMouse(self.state.mouse)) |mouse| { 1561 - if (mouse.type == .press and mouse.button == .left) { 1562 // When leaving a channel we mark it as read, so we make sure that's done 1563 // before we change to the new channel. 1564 self.markSelectedChannelRead();
··· 1558 .height = .{ .limit = 1 }, 1559 }); 1560 if (channel_win.hasMouse(self.state.mouse)) |mouse| { 1561 + if (mouse.type == .press and mouse.button == .left and self.state.buffers.selected_idx != row) { 1562 // When leaving a channel we mark it as read, so we make sure that's done 1563 // before we change to the new channel. 1564 self.markSelectedChannelRead();