Skip to content

Commit

Permalink
[fix]: navbar color in land
Browse files Browse the repository at this point in the history
  • Loading branch information
F0x1d committed Oct 6, 2023
1 parent a8c9b2d commit 2179ec8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.f0x1d.logfox.databinding.ActivityMainBinding
import com.f0x1d.logfox.extensions.contrastedNavBarAvailable
import com.f0x1d.logfox.extensions.gesturesAvailable
import com.f0x1d.logfox.extensions.hasNotificationsPermission
import com.f0x1d.logfox.extensions.isHorizontalOrientation
import com.f0x1d.logfox.ui.activity.base.BaseViewModelActivity
import com.f0x1d.logfox.utils.event.Event
import com.f0x1d.logfox.viewmodel.MainViewModel
Expand Down Expand Up @@ -107,8 +108,8 @@ class MainActivity: BaseViewModelActivity<MainViewModel, ActivityMainBinding>(),
}

if (!gesturesAvailable && contrastedNavBarAvailable) {
window.navigationBarColor = when (barShown) {
true -> Color.TRANSPARENT
window.navigationBarColor = when {
barShown && !isHorizontalOrientation -> Color.TRANSPARENT

else -> getColor(R.color.navbar_transparent_background)
}
Expand Down

0 comments on commit 2179ec8

Please sign in to comment.