Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Fix recent tabs intermittent tests #21557

Merged
merged 2 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions app/src/main/java/org/mozilla/fenix/ext/BrowserState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import mozilla.components.browser.state.selector.selectedNormalTab
import mozilla.components.browser.state.state.BrowserState
import mozilla.components.browser.state.state.TabSessionState
import mozilla.components.feature.tabs.ext.hasMediaPlayed
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.home.recenttabs.RecentTab
import org.mozilla.fenix.tabstray.browser.TabGroup
import org.mozilla.fenix.tabstray.browser.maxActiveTime
Expand All @@ -35,9 +34,7 @@ fun BrowserState.asRecentTabs(): List<RecentTab> {
inProgressMediaTab?.let { add(RecentTab.Tab(it)) }
}

if (FeatureFlags.tabGroupFeature) {
lastSearchGroup?.let { add(it) }
}
lastSearchGroup?.let { add(it) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import mozilla.components.browser.icons.compose.Placeholder
import mozilla.components.browser.icons.compose.WithIcon
import mozilla.components.support.ktx.kotlin.getRepresentativeSnippet
import mozilla.components.ui.colors.PhotonColors
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.R
import org.mozilla.fenix.components.components
import org.mozilla.fenix.home.recenttabs.RecentTab
Expand Down Expand Up @@ -77,14 +78,16 @@ fun RecentTabs(
)
}
is RecentTab.SearchGroup -> {
RecentSearchGroupItem(
searchTerm = tab.searchTerm,
tabId = tab.tabId,
url = tab.url,
thumbnail = tab.thumbnail,
count = tab.count,
onSearchGroupClicked = onRecentSearchGroupClicked
)
if (FeatureFlags.tabGroupFeature) {
RecentSearchGroupItem(
searchTerm = tab.searchTerm,
tabId = tab.tabId,
url = tab.url,
thumbnail = tab.thumbnail,
count = tab.count,
onSearchGroupClicked = onRecentSearchGroupClicked
)
}
}
}
}
Expand Down