mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
b3b837379b
commit
d3204c2c96
2 changed files with 4 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ pub fn init() {
|
|||
|
||||
LAYOUT.with(Default::default);
|
||||
FLAVOR.with(Default::default);
|
||||
FLAVOR.merge_with_theme(&config_dir);
|
||||
FLAVOR.merge_with(&MERGED_THEME, &config_dir);
|
||||
|
||||
KEYMAP.with(Default::default);
|
||||
LOG.with(Default::default);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use std::path::Path;
|
|||
|
||||
use anyhow::Context;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use yazi_shared::RoCell;
|
||||
|
||||
use crate::{Preset, MERGED_THEME};
|
||||
|
||||
|
|
@ -23,7 +24,7 @@ impl Default for Flavor {
|
|||
}
|
||||
|
||||
impl Flavor {
|
||||
pub fn merge_with_theme(&self, p: &Path) {
|
||||
pub fn merge_with(&self, merged: &RoCell<String>, p: &Path) {
|
||||
if self.use_.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
|
@ -33,6 +34,6 @@ impl Flavor {
|
|||
.with_context(|| format!("Failed to load flavor from: {:?}", path))
|
||||
.unwrap();
|
||||
|
||||
MERGED_THEME.replace(Preset::merge_str(&s, &MERGED_THEME));
|
||||
merged.replace(Preset::merge_str(&s, merged));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue