diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlUIView.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlUIView.kt index b918db006f..88cc53ce23 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlUIView.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlUIView.kt @@ -22,9 +22,7 @@ private fun SessionControlState.toAdapterList(): List { if (tabs.isNotEmpty()) { items.add(AdapterItem.TabHeader) tabs.map(AdapterItem::TabItem).forEach { items.add(it) } - if (mode == Mode.Private) { - items.add(AdapterItem.ArchiveTabs) - } + items.add(if (mode == Mode.Private) AdapterItem.DeleteTabs else AdapterItem.ArchiveTabs) } else { if (mode == Mode.Private) { items.add(AdapterItem.PrivateBrowsingDescription) @@ -55,7 +53,7 @@ class SessionControlUIView( ) { override val view: RecyclerView = LayoutInflater.from(container.context) - .inflate(R.layout.component_home, container, true) + .inflate(R.layout.component_session_control, container, true) .findViewById(R.id.home_component) private val sessionControlAdapter = SessionControlAdapter(actionEmitter) diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/DeleteTabsViewHolder.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/DeleteTabsViewHolder.kt index 62e8f5ac1a..a1f0b7bd1b 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/DeleteTabsViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/DeleteTabsViewHolder.kt @@ -20,7 +20,7 @@ class DeleteTabsViewHolder( init { view.delete_session_button.setOnClickListener { - actionEmitter.onNext(TabAction.Archive) + actionEmitter.onNext(TabAction.CloseAll(true)) } } companion object { diff --git a/app/src/main/res/layout/component_home.xml b/app/src/main/res/layout/component_session_control.xml similarity index 100% rename from app/src/main/res/layout/component_home.xml rename to app/src/main/res/layout/component_session_control.xml diff --git a/app/src/main/res/layout/component_sessions.xml b/app/src/main/res/layout/component_sessions.xml deleted file mode 100644 index 755a455a72..0000000000 --- a/app/src/main/res/layout/component_sessions.xml +++ /dev/null @@ -1,8 +0,0 @@ - - \ No newline at end of file diff --git a/app/src/main/res/layout/component_tabs.xml b/app/src/main/res/layout/component_tabs.xml deleted file mode 100644 index b99dd8cef0..0000000000 --- a/app/src/main/res/layout/component_tabs.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file