This commit is contained in:
Stephan Dilly 2021-09-03 00:20:38 +02:00
parent aaf0e4cfbf
commit 3b5d43ecb2
2 changed files with 7 additions and 8 deletions

View File

@ -6,7 +6,7 @@ use super::{
use crate::{
keys::SharedKeyConfig,
queue::{InternalEvent, Queue},
strings::{self, order},
strings::{self, order, symbol},
ui::{self, common_nav, style::SharedTheme},
AsyncAppNotification, AsyncNotification,
};
@ -27,10 +27,6 @@ use tui::{
Frame,
};
const FOLDER_ICON_COLLAPSED: &str = "\u{25b8}"; //▸
const FOLDER_ICON_EXPANDED: &str = "\u{25be}"; //▾
const EMPTY_STR: &str = "";
enum Focus {
Tree,
File,
@ -117,12 +113,12 @@ impl RevisionFilesComponent {
let is_path = item.kind().is_path();
let path_arrow = if is_path {
if item.kind().is_path_collapsed() {
FOLDER_ICON_COLLAPSED
symbol::FOLDER_ICON_COLLAPSED
} else {
FOLDER_ICON_EXPANDED
symbol::FOLDER_ICON_EXPANDED
}
} else {
EMPTY_STR
symbol::EMPTY_STR
};
let path = format!("{}{}{}", indent_str, path_arrow, path);

View File

@ -27,6 +27,9 @@ pub mod symbol {
pub const CHECKMARK: &str = "\u{2713}"; //✓
pub const SPACE: &str = "\u{02FD}"; //˽
pub const EMPTY_SPACE: &str = " ";
pub const FOLDER_ICON_COLLAPSED: &str = "\u{25b8}"; //▸
pub const FOLDER_ICON_EXPANDED: &str = "\u{25be}"; //▾
pub const EMPTY_STR: &str = "";
}
pub fn title_branches() -> String {