File tree Expand file tree Collapse file tree 5 files changed +1
-17
lines changed
Expand file tree Collapse file tree 5 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -148,12 +148,9 @@ impl ChangesComponent {
148148
149149 fn dispatch_reset_workdir ( & mut self ) -> bool {
150150 if let Some ( tree_item) = self . selection ( ) {
151- let is_folder =
152- matches ! ( tree_item. kind, FileTreeItemKind :: Path ( _) ) ;
153151 self . queue . push ( InternalEvent :: ConfirmAction (
154152 Action :: Reset ( ResetItem {
155153 path : tree_item. info . full_path ,
156- is_folder,
157154 } ) ,
158155 ) ) ;
159156
Original file line number Diff line number Diff line change @@ -617,7 +617,6 @@ impl DiffComponent {
617617 self . queue . push ( InternalEvent :: ConfirmAction ( Action :: Reset (
618618 ResetItem {
619619 path : self . current . path . clone ( ) ,
620- is_folder : false ,
621620 } ,
622621 ) ) ) ;
623622 }
Original file line number Diff line number Diff line change @@ -100,11 +100,6 @@ impl RevisionFilesComponent {
100100 self . revision . as_ref ( )
101101 }
102102
103- ///
104- pub const fn selection ( & self ) -> Option < usize > {
105- self . tree . selection ( )
106- }
107-
108103 ///
109104 pub fn update ( & mut self , ev : AsyncNotification ) -> Result < ( ) > {
110105 self . current_file . update ( ev) ;
Original file line number Diff line number Diff line change @@ -18,15 +18,11 @@ use std::path::Path;
1818#[ derive( Clone , Debug ) ]
1919pub struct FileTreeOpen {
2020 pub commit_id : CommitId ,
21- pub selection : Option < usize > ,
2221}
2322
2423impl FileTreeOpen {
2524 pub const fn new ( commit_id : CommitId ) -> Self {
26- Self {
27- commit_id,
28- selection : None ,
29- }
25+ Self { commit_id }
3026 }
3127}
3228
@@ -81,7 +77,6 @@ impl RevisionFilesPopup {
8177 self . queue . push ( InternalEvent :: PopupStackPush (
8278 StackablePopupOpen :: FileTree ( FileTreeOpen {
8379 commit_id : revision. id ,
84- selection : self . files . selection ( ) ,
8580 } ) ,
8681 ) ) ;
8782 }
Original file line number Diff line number Diff line change @@ -35,8 +35,6 @@ bitflags! {
3535pub struct ResetItem {
3636 /// path to the item (folder/file)
3737 pub path : String ,
38- /// are talking about a folder here? otherwise it's a single file
39- pub is_folder : bool ,
4038}
4139
4240///
You can’t perform that action at this time.
0 commit comments