aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Jankowski <daniel.jankowski@rub.de>2023-11-13 23:03:48 +0100
committerDaniel Jankowski <daniel.jankowski@rub.de>2023-11-13 23:31:39 +0100
commit5d91f0055cf84cb51a729437d9fc0077e5ddae71 (patch)
treef516ba9f61ab484f889e10e8d6b371f7e8cf6ab1 /src
parentchore: update cargo dependencies (diff)
downloadsl0pstatus-5d91f0055cf84cb51a729437d9fc0077e5ddae71.tar.gz
sl0pstatus-5d91f0055cf84cb51a729437d9fc0077e5ddae71.tar.xz
sl0pstatus-5d91f0055cf84cb51a729437d9fc0077e5ddae71.zip
fix: dont check if detached due to wrong info from zellij
This fixes #24. Zellij somehow propagates the session information correctly sometimes after the serialization interval.
Diffstat (limited to 'src')
-rw-r--r--src/main.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs
index 68f8926..1638984 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -183,7 +183,7 @@ impl ZellijPlugin for State {
}
fn render(&mut self, _rows: usize, cols: usize) {
- if is_detached(self.state.clone()) || !self.got_permissions {
+ if !self.got_permissions {
return;
}
@@ -194,15 +194,6 @@ impl ZellijPlugin for State {
}
}
-fn is_detached(state: ZellijState) -> bool {
- let current_session = match state.sessions.iter().find(|s| s.is_current_session) {
- Some(s) => s,
- None => return false,
- };
-
- current_session.connected_clients == 0
-}
-
fn register_widgets(configuration: BTreeMap<String, String>) -> BTreeMap<String, Arc<dyn Widget>> {
let mut widget_map = BTreeMap::<String, Arc<dyn Widget>>::new();