Skip to content

Commit

Permalink
Fix recent tabs intermittent tests (mozilla-mobile#21557)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and pkirakosyan committed Oct 1, 2021
1 parent 1499e33 commit bc23ca2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
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

0 comments on commit bc23ca2

Please sign in to comment.