File tree 5 files changed +1
-17
lines changed
5 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -148,12 +148,9 @@ impl ChangesComponent {
148
148
149
149
fn dispatch_reset_workdir ( & mut self ) -> bool {
150
150
if let Some ( tree_item) = self . selection ( ) {
151
- let is_folder =
152
- matches ! ( tree_item. kind, FileTreeItemKind :: Path ( _) ) ;
153
151
self . queue . push ( InternalEvent :: ConfirmAction (
154
152
Action :: Reset ( ResetItem {
155
153
path : tree_item. info . full_path ,
156
- is_folder,
157
154
} ) ,
158
155
) ) ;
159
156
Original file line number Diff line number Diff line change @@ -617,7 +617,6 @@ impl DiffComponent {
617
617
self . queue . push ( InternalEvent :: ConfirmAction ( Action :: Reset (
618
618
ResetItem {
619
619
path : self . current . path . clone ( ) ,
620
- is_folder : false ,
621
620
} ,
622
621
) ) ) ;
623
622
}
Original file line number Diff line number Diff line change @@ -100,11 +100,6 @@ impl RevisionFilesComponent {
100
100
self . revision . as_ref ( )
101
101
}
102
102
103
- ///
104
- pub const fn selection ( & self ) -> Option < usize > {
105
- self . tree . selection ( )
106
- }
107
-
108
103
///
109
104
pub fn update ( & mut self , ev : AsyncNotification ) -> Result < ( ) > {
110
105
self . current_file . update ( ev) ;
Original file line number Diff line number Diff line change @@ -18,15 +18,11 @@ use std::path::Path;
18
18
#[ derive( Clone , Debug ) ]
19
19
pub struct FileTreeOpen {
20
20
pub commit_id : CommitId ,
21
- pub selection : Option < usize > ,
22
21
}
23
22
24
23
impl FileTreeOpen {
25
24
pub const fn new ( commit_id : CommitId ) -> Self {
26
- Self {
27
- commit_id,
28
- selection : None ,
29
- }
25
+ Self { commit_id }
30
26
}
31
27
}
32
28
@@ -81,7 +77,6 @@ impl RevisionFilesPopup {
81
77
self . queue . push ( InternalEvent :: PopupStackPush (
82
78
StackablePopupOpen :: FileTree ( FileTreeOpen {
83
79
commit_id : revision. id ,
84
- selection : self . files . selection ( ) ,
85
80
} ) ,
86
81
) ) ;
87
82
}
Original file line number Diff line number Diff line change @@ -35,8 +35,6 @@ bitflags! {
35
35
pub struct ResetItem {
36
36
/// path to the item (folder/file)
37
37
pub path : String ,
38
- /// are talking about a folder here? otherwise it's a single file
39
- pub is_folder : bool ,
40
38
}
41
39
42
40
///
You can’t perform that action at this time.
0 commit comments