fix: assume log subscription in logview

The log subscription is now managed by minilog, which is always running. This
unbreaks the minilog after showing/hiding the logview.
This commit is contained in:
CJ van den Berg 2024-03-31 22:01:43 +02:00
parent 82586bbb0c
commit 151caf8dea

View file

@ -32,7 +32,6 @@ pub fn create(a: Allocator, parent: nc.Plane) !Widget {
const self: *Self = try a.create(Self);
self.* = init(parent) catch |e| return tp.exit_error(e);
try tui.current().message_filters.add(MessageFilter.bind(self, log_receive));
try log.subscribe();
return Widget.to(self);
}
@ -46,7 +45,6 @@ fn init(parent: nc.Plane) !Self {
}
pub fn deinit(self: *Self, a: Allocator) void {
log.unsubscribe() catch {};
tui.current().message_filters.remove_ptr(self);
self.plane.deinit();
a.destroy(self);