an experimental irc client

fix: actually fix markread_on_focus

rockorager.dev 538115cd 271accc6

verified
+9 -3
+8 -2
src/app.zig
··· 287 287 288 288 .focus_in => { 289 289 if (self.config.markread_on_focus) { 290 - // TODO: implement this 291 - 290 + if (self.selectedBuffer()) |buffer| { 291 + switch (buffer) { 292 + .client => {}, 293 + .channel => |channel| { 294 + channel.last_read_indicator = channel.last_read; 295 + }, 296 + } 297 + } 292 298 } 293 299 self.has_focus = true; 294 300 ctx.redraw = true;
+1 -1
src/lua.zig
··· 221 221 222 222 const field_enum = std.meta.stringToEnum(comlink.Config.Fields(), field) orelse continue; 223 223 switch (field_enum) { 224 - .markread_on_focus => app.config.markread_on_focus = lua.toBoolean(1), 224 + .markread_on_focus => app.config.markread_on_focus = lua.toBoolean(-1), 225 225 } 226 226 } 227 227 return 0;