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
247
}
248
248
},
249
249
.focus_out => self.has_focus = false,
250
250
-
.focus_in => self.has_focus = true,
250
250
+
251
251
+
.focus_in => {
252
252
+
if (self.selectedBuffer()) |buffer| {
253
253
+
// If we have a selected channel, we reset the last_read_indicator state when
254
254
+
// losing focus. This means that any messages received
255
255
+
switch (buffer) {
256
256
+
.client => {},
257
257
+
.channel => |channel| channel.last_read_indicator = channel.last_read,
258
258
+
}
259
259
+
}
260
260
+
261
261
+
self.has_focus = true;
262
262
+
},
251
263
252
264
else => {},
253
265
}