Track archived tab state transitions

This commit is contained in:
2026-05-07 20:09:42 -04:00
parent 8fff64606d
commit 42d33ac06c
3 changed files with 21 additions and 4 deletions
+5 -2
View File
@@ -17,7 +17,8 @@ pub struct ArchivedTab {
impl ArchivedTab {
#[must_use]
pub fn new(tab: BrowserTab, source: ArchiveSource) -> Self {
pub fn new(mut tab: BrowserTab, source: ArchiveSource) -> Self {
tab.mark_archived();
Self { tab, archived_at: SystemTime::now(), source }
}
@@ -38,6 +39,8 @@ impl ArchivedTab {
#[must_use]
pub fn into_tab(self) -> BrowserTab {
self.tab
let mut tab = self.tab;
tab.mark_ready();
tab
}
}