diff --git a/src/app/browser/window/header/bar/menu.rs b/src/app/browser/window/header/bar/menu.rs index 1dd15785..52e53008 100644 --- a/src/app/browser/window/header/bar/menu.rs +++ b/src/app/browser/window/header/bar/menu.rs @@ -206,7 +206,7 @@ impl Menu { // History main_history_closed.remove_all(); - for item in profile.history.memory.closed.recent(RECENTLY_CLOSED) { + for item in profile.history.memory.tab.recent(RECENTLY_CLOSED) { let item_request = item.page.navigation.request.widget.entry.text(); // @TODO restore entire `Item` let menu_item = gio::MenuItem::new(Some(&label(&item_request, LABEL_MAX_LENGTH)), None); menu_item.set_action_and_target_value(Some(&format!( diff --git a/src/app/browser/window/tab.rs b/src/app/browser/window/tab.rs index 079a9a4a..7c32ffcc 100644 --- a/src/app/browser/window/tab.rs +++ b/src/app/browser/window/tab.rs @@ -107,7 +107,7 @@ impl Tab { profile .history .memory - .closed + .tab .add(item, DateTime::now_local().unwrap().to_unix()); } } diff --git a/src/profile/history/memory.rs b/src/profile/history/memory.rs index b15f1b35..cb6fe608 100644 --- a/src/profile/history/memory.rs +++ b/src/profile/history/memory.rs @@ -1,9 +1,9 @@ -mod closed; -use closed::Closed; +mod tab; +use tab::Tab; /// Reduce disk usage by cache Bookmarks index in memory pub struct Memory { - pub closed: Closed, + pub tab: Tab, } impl Default for Memory { @@ -17,8 +17,6 @@ impl Memory { /// Create new `Self` pub fn new() -> Self { - Self { - closed: Closed::new(), - } + Self { tab: Tab::new() } } } diff --git a/src/profile/history/memory/closed.rs b/src/profile/history/memory/tab.rs similarity index 95% rename from src/profile/history/memory/closed.rs rename to src/profile/history/memory/tab.rs index c25e5f3f..c3111dfb 100644 --- a/src/profile/history/memory/closed.rs +++ b/src/profile/history/memory/tab.rs @@ -8,17 +8,17 @@ pub struct Record { } /// Recently closed tabs index -pub struct Closed { +pub struct Tab { index: RefCell>, } -impl Default for Closed { +impl Default for Tab { fn default() -> Self { Self::new() } } -impl Closed { +impl Tab { // Constructors /// Create new `Self`