Skip to content

Commit

Permalink
For mozilla-mobile#15402: Fix ktlint fails
Browse files Browse the repository at this point in the history
  • Loading branch information
sijanr committed Oct 9, 2020
1 parent b4d5975 commit c6d5108
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -13,7 +13,6 @@ import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.View
import android.widget.ImageView
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.isVisible
import androidx.core.view.marginTop
import com.google.android.material.appbar.AppBarLayout
Expand Down Expand Up @@ -46,8 +45,8 @@ class TrackingProtectionOverlay(

private fun shouldShowTrackingProtectionOnboarding(session: Session) =
session.trackerBlockingEnabled &&
session.trackersBlocked.isNotEmpty() &&
settings.shouldShowTrackingProtectionCfr
session.trackersBlocked.isNotEmpty() &&
settings.shouldShowTrackingProtectionCfr

@Suppress("MagicNumber", "InflateParams")
private fun showTrackingProtectionOnboarding() {
Expand All @@ -58,14 +57,14 @@ class TrackingProtectionOverlay(

when (toolbarPosition) {
ToolbarPosition.BOTTOM -> {
if(getToolbar().translationY > 0) {
if (getToolbar().translationY > 0) {
return
}
}
ToolbarPosition.TOP -> {
val appBarLayout = getToolbar().parent as? AppBarLayout
appBarLayout?.let { appBar ->
if(appBar.y != 0.toFloat()) {
if (appBar.y != 0.toFloat()) {
return
}
}
Expand Down

0 comments on commit c6d5108

Please sign in to comment.