@@ -19,11 +19,10 @@ use crossterm::event::Event;
19
19
use std:: { borrow:: Cow , cell:: Cell , convert:: From , path:: Path } ;
20
20
use tui:: { backend:: Backend , layout:: Rect , text:: Span , Frame } ;
21
21
22
- //TODO: rename so that its clear this only works for Statuses
23
22
//TODO: use new `filetreelist` crate
24
23
25
24
///
26
- pub struct FileTreeComponent {
25
+ pub struct StatusTreeComponent {
27
26
title : String ,
28
27
tree : StatusTree ,
29
28
pending : bool ,
@@ -36,7 +35,7 @@ pub struct FileTreeComponent {
36
35
scroll_top : Cell < usize > ,
37
36
}
38
37
39
- impl FileTreeComponent {
38
+ impl StatusTreeComponent {
40
39
///
41
40
pub fn new (
42
41
title : & str ,
@@ -308,7 +307,7 @@ struct TextDrawInfo<'a> {
308
307
item_kind : & ' a FileTreeItemKind ,
309
308
}
310
309
311
- impl DrawableComponent for FileTreeComponent {
310
+ impl DrawableComponent for StatusTreeComponent {
312
311
fn draw < B : Backend > (
313
312
& self ,
314
313
f : & mut Frame < B > ,
@@ -377,7 +376,7 @@ impl DrawableComponent for FileTreeComponent {
377
376
}
378
377
}
379
378
380
- impl Component for FileTreeComponent {
379
+ impl Component for StatusTreeComponent {
381
380
fn commands (
382
381
& self ,
383
382
out : & mut Vec < CommandInfo > ,
@@ -496,7 +495,7 @@ mod tests {
496
495
let mut frame = terminal. get_frame ( ) ;
497
496
498
497
// set up file tree
499
- let mut ftc = FileTreeComponent :: new (
498
+ let mut ftc = StatusTreeComponent :: new (
500
499
"title" ,
501
500
true ,
502
501
None ,
@@ -537,7 +536,7 @@ mod tests {
537
536
let mut frame = terminal. get_frame ( ) ;
538
537
539
538
// set up file tree
540
- let mut ftc = FileTreeComponent :: new (
539
+ let mut ftc = StatusTreeComponent :: new (
541
540
"title" ,
542
541
true ,
543
542
None ,
0 commit comments