feat: don't log file browser completion messages
This commit is contained in:
parent
e752e8a405
commit
67f49110dc
2 changed files with 16 additions and 2 deletions
|
@ -83,6 +83,9 @@ fn receive_log(self: *Self, _: tp.pid_ref, m: tp.message) MessageFilter.Error!bo
|
|||
try logview.process_log(m);
|
||||
try self.process_log(m);
|
||||
return true;
|
||||
} else if (try cbor.match(m.buf, .{ "message", tp.more })) {
|
||||
try self.process_message(m);
|
||||
return true;
|
||||
} else if (try cbor.match(m.buf, .{ "MINILOG", tp.extract(&clear_msg_num) })) {
|
||||
if (clear_msg_num == self.msg_counter)
|
||||
self.clear();
|
||||
|
@ -114,6 +117,12 @@ fn process_log(self: *Self, m: tp.message) MessageFilter.Error!void {
|
|||
}
|
||||
}
|
||||
|
||||
fn process_message(self: *Self, m: tp.message) MessageFilter.Error!void {
|
||||
var msg: []const u8 = undefined;
|
||||
if (try cbor.match(m.buf, .{ tp.string, tp.extract(&msg) }))
|
||||
try self.set(msg, .info);
|
||||
}
|
||||
|
||||
fn update_clear_timer(self: *Self) !void {
|
||||
self.msg_counter += 1;
|
||||
const delay = std.time.us_per_s * @as(u64, if (self.level == .err) error_display_time_seconds else message_display_time_seconds);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue