mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/3091 - Hide Pull to Refresh under flag (https://github.com/mozilla-mobile/fenix/pull/3092)
This was merged in after feature freeze so we're pulling it out for now. Pull to refresh will continue to work in debug mode so that the design can be iterated on easily.
This commit is contained in:
parent
242169b1fd
commit
b297d8c4b8
@ -250,6 +250,7 @@ android.applicationVariants.all { variant ->
|
||||
// Feature build flags
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
buildConfigField 'Boolean', 'SEND_TAB_ENABLED', (buildType == "nightly" || isDebug).toString()
|
||||
buildConfigField 'Boolean', 'PULL_TO_REFRESH_ENABLED', (false).toString()
|
||||
}
|
||||
|
||||
androidExtensions {
|
||||
|
@ -56,6 +56,7 @@ import mozilla.components.support.ktx.android.view.enterToImmersiveMode
|
||||
import mozilla.components.support.ktx.android.view.exitImmersiveModeIfNeeded
|
||||
import mozilla.components.support.ktx.kotlin.toUri
|
||||
import org.mozilla.fenix.BrowsingModeManager
|
||||
import org.mozilla.fenix.BuildConfig
|
||||
import org.mozilla.fenix.FenixViewModelProvider
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.IntentReceiverActivity
|
||||
@ -185,7 +186,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||
return view
|
||||
}
|
||||
|
||||
@Suppress("LongMethod")
|
||||
@Suppress("LongMethod", "ComplexMethod")
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
@ -334,6 +335,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||
view = view
|
||||
)
|
||||
|
||||
if (BuildConfig.PULL_TO_REFRESH_ENABLED) {
|
||||
val primaryTextColor = ThemeManager.resolveAttribute(R.attr.primaryText, requireContext())
|
||||
view.swipeRefresh.setColorSchemeColors(primaryTextColor)
|
||||
swipeRefreshFeature.set(
|
||||
@ -346,6 +348,10 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||
owner = this,
|
||||
view = view
|
||||
)
|
||||
} else {
|
||||
// Disable pull to refresh
|
||||
view.swipeRefresh.setOnChildScrollUpCallback { _, _ -> true }
|
||||
}
|
||||
|
||||
readerViewFeature.set(
|
||||
feature = ReaderViewFeature(
|
||||
|
Loading…
Reference in New Issue
Block a user