Release v0.2.7

This commit is contained in:
burnintuna 2026-07-24 02:36:05 +09:00
parent be02626912
commit f4a0c484ff
6 changed files with 273 additions and 65 deletions

View file

@ -1024,21 +1024,9 @@ impl BrowserController {
siblings: Rc<Vec<BrowserEntry>>,
profile: LocationProfile,
) -> SiblingNavigator {
let recursive = siblings.iter().any(|entry| entry.list_name.is_some());
let current_uri = entry.uri.clone();
let current_kind = entry.kind;
let position_controller = Rc::downgrade(self);
let position_uri = current_uri.clone();
let position_fallback = Rc::clone(&siblings);
let position = Rc::new(move || {
let controller = position_controller.upgrade()?;
let siblings =
controller.navigation_siblings(&position_uri, current_kind, &position_fallback);
siblings
.iter()
.position(|entry| entry.uri == position_uri)
.map(|current| (current, siblings.len()))
});
let controller = Rc::downgrade(self);
let navigate_siblings = Rc::clone(&siblings);
let navigate_current_uri = current_uri.clone();
@ -1052,6 +1040,7 @@ impl BrowserController {
&navigate_current_uri,
current_kind,
&navigate_siblings,
recursive,
);
let Some(current) = siblings
.iter()
@ -1079,7 +1068,7 @@ impl BrowserController {
return Vec::new();
};
controller
.navigation_siblings(&files_current_uri, current_kind, &files_fallback)
.navigation_siblings(&files_current_uri, current_kind, &files_fallback, recursive)
.iter()
.map(|entry| SiblingFile {
uri: entry.uri.clone(),
@ -1098,6 +1087,7 @@ impl BrowserController {
&actions_current_uri,
current_kind,
&actions_fallback,
recursive,
);
let entry = entries.iter().find(|entry| entry.uri == uri)?;
Some(SiblingFileActions {
@ -1105,7 +1095,7 @@ impl BrowserController {
download: controller.download_control(entry),
})
});
SiblingNavigator::new(position, navigate, files, actions)
SiblingNavigator::new(navigate, files, actions, recursive)
}
fn navigation_siblings(
@ -1113,7 +1103,11 @@ impl BrowserController {
current_uri: &str,
current_kind: EntryKind,
fallback: &Rc<Vec<BrowserEntry>>,
fixed: bool,
) -> Rc<Vec<BrowserEntry>> {
if fixed {
return Rc::clone(fallback);
}
let case_insensitive = self.config.borrow().case_insensitive_sort;
let state = self.state.borrow();
let entries = sorted_navigable_entries(