| ... | @@ -817,9 +817,10 @@ impl State { | ... | @@ -817,9 +817,10 @@ impl State { |
| 817 | None | 817 | None |
| 818 | } | 818 | } |
| 819 | (Target::Section { library, path }, Action::Delete) => { | 819 | (Target::Section { library, path }, Action::Delete) => { |
| | 820 | let name = crate::library::entry_name(&path).to_owned(); |
| 820 | platform::confirm( | 821 | platform::confirm( |
| 821 | "Are you sure you want to move this section to this notebook's Recycle Bin?", | 822 | "Are you sure you want to move this section to this notebook's Recycle Bin?", |
| 822 | &path.clone(), | 823 | &name, |
| 823 | "Cancel", | 824 | "Cancel", |
| 824 | "Delete", | 825 | "Delete", |
| 825 | self.reply(|state, ()| { | 826 | self.reply(|state, ()| { |
| ... | @@ -831,13 +832,10 @@ impl State { | ... | @@ -831,13 +832,10 @@ impl State { |
| 831 | None | 832 | None |
| 832 | } | 833 | } |
| 833 | (Target::Group { library, path }, Action::Delete) => { | 834 | (Target::Group { library, path }, Action::Delete) => { |
| | 835 | let name = crate::library::entry_name(&path).to_owned(); |
| 834 | platform::confirm( | 836 | platform::confirm( |
| 835 | "Are you sure you want to move the sections in this section group to this notebook's Recycle Bin?", | 837 | "Are you sure you want to move the sections in this section group to this notebook's Recycle Bin?", |
| 836 | path.rsplit('/') | 838 | &name, |
| 837 | .next() | | |
| 838 | .unwrap_or_default() | | |
| 839 | .to_owned() | | |
| 840 | .as_str(), | | |
| 841 | "Cancel", | 839 | "Cancel", |
| 842 | "Delete", | 840 | "Delete", |
| 843 | self.reply(|state, ()| { | 841 | self.reply(|state, ()| { |