tangled
alpha
login
or
join now
rockorager.dev
/
comlink
2
fork
atom
an experimental irc client
2
fork
atom
overview
issues
pulls
pipelines
ui: reset unread indicator location on focus_in
rockorager.dev
1 year ago
fc270054
a13927b8
verified
This commit was signed with the committer's
known signature
.
rockorager.dev
SSH Key Fingerprint:
SHA256:qn/Fjy7CpbcogGEPB14Y53hLnQleZNFY9lkQnuudFLs=
+13
-1
1 changed file
expand all
collapse all
unified
split
src
app.zig
+13
-1
src/app.zig
···
247
}
248
},
249
.focus_out => self.has_focus = false,
250
-
.focus_in => self.has_focus = true,
0
0
0
0
0
0
0
0
0
0
0
0
251
252
else => {},
253
}
···
247
}
248
},
249
.focus_out => self.has_focus = false,
250
+
251
+
.focus_in => {
252
+
if (self.selectedBuffer()) |buffer| {
253
+
// If we have a selected channel, we reset the last_read_indicator state when
254
+
// losing focus. This means that any messages received
255
+
switch (buffer) {
256
+
.client => {},
257
+
.channel => |channel| channel.last_read_indicator = channel.last_read,
258
+
}
259
+
}
260
+
261
+
self.has_focus = true;
262
+
},
263
264
else => {},
265
}