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::{ use crate::{
keys::SharedKeyConfig, keys::SharedKeyConfig,
queue::{InternalEvent, Queue}, queue::{InternalEvent, Queue},
strings::{self, order}, strings::{self, order, symbol},
ui::{self, common_nav, style::SharedTheme}, ui::{self, common_nav, style::SharedTheme},
AsyncAppNotification, AsyncNotification, AsyncAppNotification, AsyncNotification,
}; };
@ -27,10 +27,6 @@ use tui::{
Frame, Frame,
}; };
const FOLDER_ICON_COLLAPSED: &str = "\u{25b8}"; //▸
const FOLDER_ICON_EXPANDED: &str = "\u{25be}"; //▾
const EMPTY_STR: &str = "";
enum Focus { enum Focus {
Tree, Tree,
File, File,
@ -117,12 +113,12 @@ impl RevisionFilesComponent {
let is_path = item.kind().is_path(); let is_path = item.kind().is_path();
let path_arrow = if is_path { let path_arrow = if is_path {
if item.kind().is_path_collapsed() { if item.kind().is_path_collapsed() {
FOLDER_ICON_COLLAPSED symbol::FOLDER_ICON_COLLAPSED
} else { } else {
FOLDER_ICON_EXPANDED symbol::FOLDER_ICON_EXPANDED
} }
} else { } else {
EMPTY_STR symbol::EMPTY_STR
}; };
let path = format!("{}{}{}", indent_str, path_arrow, path); 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 CHECKMARK: &str = "\u{2713}"; //✓
pub const SPACE: &str = "\u{02FD}"; //˽ pub const SPACE: &str = "\u{02FD}"; //˽
pub const EMPTY_SPACE: &str = " "; 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 { pub fn title_branches() -> String {