mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] Issue https://github.com/mozilla-mobile/fenix/issues/17548: Remove SessionManager reference from FenixTabsAdapter
This commit is contained in:
parent
d99a2e52f8
commit
98865d66b0
@ -12,6 +12,7 @@ import androidx.recyclerview.widget.GridLayoutManager
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlinx.android.synthetic.main.checkbox_item.view.*
|
import kotlinx.android.synthetic.main.checkbox_item.view.*
|
||||||
import kotlinx.android.synthetic.main.tab_tray_item.view.*
|
import kotlinx.android.synthetic.main.tab_tray_item.view.*
|
||||||
|
import mozilla.components.browser.state.selector.findTab
|
||||||
import mozilla.components.browser.tabstray.TabViewHolder
|
import mozilla.components.browser.tabstray.TabViewHolder
|
||||||
import mozilla.components.browser.tabstray.TabsAdapter
|
import mozilla.components.browser.tabstray.TabsAdapter
|
||||||
import mozilla.components.concept.base.images.ImageLoader
|
import mozilla.components.concept.base.images.ImageLoader
|
||||||
@ -108,7 +109,7 @@ class FenixTabsAdapter(
|
|||||||
showCheckedIfSelected(tab, holder.itemView)
|
showCheckedIfSelected(tab, holder.itemView)
|
||||||
|
|
||||||
val tabIsPrivate =
|
val tabIsPrivate =
|
||||||
context.components.core.sessionManager.findSessionById(tab.id)?.private == true
|
context.components.core.store.state.findTab(tab.id)?.content?.private == true
|
||||||
if (!tabIsPrivate) {
|
if (!tabIsPrivate) {
|
||||||
holder.itemView.setOnLongClickListener {
|
holder.itemView.setOnLongClickListener {
|
||||||
if (mode is TabTrayDialogFragmentState.Mode.Normal) {
|
if (mode is TabTrayDialogFragmentState.Mode.Normal) {
|
||||||
|
Loading…
Reference in New Issue
Block a user