diff --git a/src/app/browser/window/tab.rs b/src/app/browser/window/tab.rs index f25db3de..fcbde079 100644 --- a/src/app/browser/window/tab.rs +++ b/src/app/browser/window/tab.rs @@ -112,12 +112,8 @@ impl Tab { self.widget.gobject(), self.browser_action.clone(), self.window_action.clone(), - // Options - position, - request, - is_pinned, - is_selected, - is_load, + // Options tuple + (position, request, is_pinned, is_selected, is_load), )); // Register dynamically created tab components in the HashMap index diff --git a/src/app/browser/window/tab/item.rs b/src/app/browser/window/tab/item.rs index dba8a04b..aba587ce 100644 --- a/src/app/browser/window/tab/item.rs +++ b/src/app/browser/window/tab/item.rs @@ -33,13 +33,12 @@ impl Item { // Actions browser_action: Rc, window_action: Rc, - // Options - position: Option, - request: Option, - is_pinned: bool, - is_selected: bool, - is_load: bool, + // Options tuple @TODO struct? + options: (Option, Option, bool, bool, bool), ) -> Self { + // Get item options from tuple + let (position, request, is_pinned, is_selected, is_load) = options; + // Generate unique ID for new page components let id = uuid_string_random(); @@ -150,12 +149,8 @@ impl Item { // Actions browser_action.clone(), window_action.clone(), - // Options - None, - None, - record.is_pinned, - record.is_selected, - false, + // Options tuple + (None, None, record.is_pinned, record.is_selected, false), )); // Delegate restore action to the item childs