diff options
| author | Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> | 2023-06-12 21:01:20 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-12 21:01:20 +0900 |
| commit | 84f6edf9991acd8412d1a0b8fa4cadf334c4c70c (patch) | |
| tree | dc8fbd3fd93f64b5deb79c7a48284007e2c9518d /default-plugins | |
| parent | docs(changelog): plugin api (diff) | |
| download | sl0ppij-84f6edf9991acd8412d1a0b8fa4cadf334c4c70c.tar.gz sl0ppij-84f6edf9991acd8412d1a0b8fa4cadf334c4c70c.tar.xz sl0ppij-84f6edf9991acd8412d1a0b8fa4cadf334c4c70c.zip | |
fix: improve user experience (#2522)
Diffstat (limited to 'default-plugins')
| -rw-r--r-- | default-plugins/status-bar/src/tip/utils.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/default-plugins/status-bar/src/tip/utils.rs b/default-plugins/status-bar/src/tip/utils.rs index 70ea3cd0..17b0d40d 100644 --- a/default-plugins/status-bar/src/tip/utils.rs +++ b/default-plugins/status-bar/src/tip/utils.rs @@ -37,7 +37,11 @@ pub fn get_random_tip_name() -> String { } pub fn get_cached_tip_name() -> String { - let mut local_cache = LocalCache::new(PathBuf::from(DEFAULT_CACHE_FILE_PATH)).unwrap(); + let mut local_cache = match LocalCache::new(PathBuf::from(DEFAULT_CACHE_FILE_PATH)) { + // TODO: it might be a good to leave an log with warn later, if possible. + Err(_) => return String::from("quicknav"), + Ok(cache) => cache, + }; let zellij_version = get_zellij_version(); if zellij_version.ne(local_cache.get_version()) { |
