Restore archived tabs from sidebar

This commit is contained in:
2026-05-07 20:06:18 -04:00
parent 75e17fc70f
commit 8fff64606d
5 changed files with 128 additions and 4 deletions
+11
View File
@@ -131,6 +131,17 @@ impl BrowserCore {
self.restore_tab(tab)
}
pub fn restore_archived_tab(&mut self, tab_id: &TabId) -> Result<TabId, CoreError> {
let index = self
.archived_tabs
.iter()
.position(|archived| archived.tab().id() == tab_id)
.ok_or_else(|| CoreError::TabNotFound { id: tab_id.clone() })?;
let archived_tab = self.archived_tabs.remove(index);
let tab = archived_tab.into_tab();
self.restore_tab(tab)
}
pub fn restore_archived_tab_match(&mut self, query: &str) -> Result<Option<TabId>, CoreError> {
let normalized_query = query.trim().to_lowercase();
if normalized_query.is_empty() {