diff options
| author | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-09-03 08:26:27 +0200 |
|---|---|---|
| committer | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-09-03 08:26:27 +0200 |
| commit | 34c90ccea120f20386f1ef4ba30198df16fb7bbd (patch) | |
| tree | b2e34b530ee8bdeeda3762ee0e1211cc6194960d /src | |
| parent | chore: fix clippy issue (diff) | |
| download | sl0pstatus-34c90ccea120f20386f1ef4ba30198df16fb7bbd.tar.gz sl0pstatus-34c90ccea120f20386f1ef4ba30198df16fb7bbd.tar.xz sl0pstatus-34c90ccea120f20386f1ef4ba30198df16fb7bbd.zip | |
fix: make non-selectable on permissionresult
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs index 0614a06..41ffb09 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,19 +43,11 @@ impl ZellijPlugin for State { subscribe(&[ EventType::ModeUpdate, EventType::PaneUpdate, + EventType::PermissionRequestResult, EventType::TabUpdate, EventType::SessionUpdate, ]); - let mut selectable = false; - if let Some(first_start) = configuration.get("first_start") { - if first_start.eq("true") { - selectable = true; - } - } - - set_selectable(selectable); - self.userspace_configuration = configuration.clone(); self.module_config = ModuleConfig::new(configuration.clone()); self.widget_map = register_widgets(configuration); @@ -85,6 +77,9 @@ impl ZellijPlugin for State { should_render = true; } } + Event::PermissionRequestResult(_result) => { + set_selectable(false); + } Event::SessionUpdate(session_info) => { if self.module_config.hide_frame_for_single_pane { let current_session = session_info.iter().find(|s| s.is_current_session); |
