diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt index cf39033bfb..893a7a2904 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt @@ -11,7 +11,6 @@ import androidx.recyclerview.widget.RecyclerView import io.reactivex.Observer import kotlinx.coroutines.Job import org.mozilla.fenix.home.sessioncontrol.viewholders.SaveTabGroupViewHolder -import org.mozilla.fenix.home.sessioncontrol.viewholders.DeleteTabsViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.NoTabMessageViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.PrivateBrowsingDescriptionViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.TabHeaderViewHolder @@ -36,7 +35,6 @@ sealed class AdapterItem { object NoTabMessage : AdapterItem() data class TabItem(val tab: Tab) : AdapterItem() object SaveTabGroup : AdapterItem() - object DeleteTabs : AdapterItem() object PrivateBrowsingDescription : AdapterItem() @@ -65,7 +63,6 @@ sealed class AdapterItem { is TabItem -> TabViewHolder.LAYOUT_ID SaveTabGroup -> SaveTabGroupViewHolder.LAYOUT_ID PrivateBrowsingDescription -> PrivateBrowsingDescriptionViewHolder.LAYOUT_ID - DeleteTabs -> DeleteTabsViewHolder.LAYOUT_ID CollectionHeader -> CollectionHeaderViewHolder.LAYOUT_ID NoCollectionMessage -> NoCollectionMessageViewHolder.LAYOUT_ID is CollectionItem -> CollectionViewHolder.LAYOUT_ID @@ -105,7 +102,6 @@ class SessionControlAdapter( TabViewHolder.LAYOUT_ID -> TabViewHolder(view, actionEmitter, job) SaveTabGroupViewHolder.LAYOUT_ID -> SaveTabGroupViewHolder(view, actionEmitter) PrivateBrowsingDescriptionViewHolder.LAYOUT_ID -> PrivateBrowsingDescriptionViewHolder(view, actionEmitter) - DeleteTabsViewHolder.LAYOUT_ID -> DeleteTabsViewHolder(view, actionEmitter) CollectionHeaderViewHolder.LAYOUT_ID -> CollectionHeaderViewHolder(view) NoCollectionMessageViewHolder.LAYOUT_ID -> NoCollectionMessageViewHolder(view) CollectionViewHolder.LAYOUT_ID -> CollectionViewHolder(view, actionEmitter, job) 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 9e19d30e2b..83e05f03c0 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 @@ -53,7 +53,6 @@ private fun privateModeAdapterItems(tabs: List): List { if (tabs.isNotEmpty()) { items.addAll(tabs.reversed().map(AdapterItem::TabItem)) - items.add(AdapterItem.DeleteTabs) } else { items.add(AdapterItem.PrivateBrowsingDescription) } 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 deleted file mode 100644 index a1f0b7bd1b..0000000000 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/DeleteTabsViewHolder.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.home.sessioncontrol.viewholders - -import android.view.View -import androidx.recyclerview.widget.RecyclerView -import io.reactivex.Observer -import kotlinx.android.synthetic.main.delete_tabs_button.view.* -import org.mozilla.fenix.R -import org.mozilla.fenix.home.sessioncontrol.SessionControlAction -import org.mozilla.fenix.home.sessioncontrol.TabAction -import org.mozilla.fenix.home.sessioncontrol.onNext - -class DeleteTabsViewHolder( - view: View, - private val actionEmitter: Observer -) : RecyclerView.ViewHolder(view) { - - init { - view.delete_session_button.setOnClickListener { - actionEmitter.onNext(TabAction.CloseAll(true)) - } - } - companion object { - const val LAYOUT_ID = R.layout.delete_tabs_button - } -} diff --git a/app/src/main/res/layout/delete_tabs_button.xml b/app/src/main/res/layout/delete_tabs_button.xml deleted file mode 100644 index af3516eea0..0000000000 --- a/app/src/main/res/layout/delete_tabs_button.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - \ No newline at end of file