Skip to content

Commit

Permalink
actions: less warnings is more (fixes #3626) (#3637)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
strawberrybread and dogi authored Jun 20, 2024
1 parent 324a1e8 commit 37cfc5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1605
versionName "0.16.5"
versionCode 1606
versionName "0.16.6"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ import android.view.WindowManager
import androidx.activity.OnBackPressedCallback
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.drawerlayout.widget.DrawerLayout
import androidx.fragment.app.Fragment
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.google.android.material.navigation.NavigationBarView
import com.google.android.material.tabs.TabLayout
import com.google.android.material.tabs.TabLayout.OnTabSelectedListener
import com.mikepenz.materialdrawer.AccountHeader
Expand Down Expand Up @@ -61,7 +65,7 @@ import org.ole.planet.myplanet.utilities.LocaleHelper
import org.ole.planet.myplanet.utilities.Utilities
import org.ole.planet.myplanet.utilities.Utilities.toast

class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, BottomNavigationView.OnNavigationItemSelectedListener {
class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, NavigationBarView.OnItemSelectedListener {
private lateinit var activityDashboardBinding: ActivityDashboardBinding
private var headerResult: AccountHeader? = null
var user: RealmUserModel? = null
Expand Down Expand Up @@ -115,7 +119,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, B
openCallFragment(InactiveDashboardFragment(), "Dashboard")
return
}
navigationView.setOnNavigationItemSelectedListener(this)
navigationView.setOnItemSelectedListener(this)
navigationView.visibility = if (UserProfileDbHandler(this).userModel?.isShowTopbar == true) {
View.VISIBLE
} else {
Expand All @@ -129,7 +133,8 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, B
result?.stickyFooter?.setPadding(0, 0, 0, 0) // moves logout button to the very bottom of the drawer. Without it, the "logout" button suspends a little.
result?.actionBarDrawerToggle?.isDrawerIndicatorEnabled = true
dl = result?.drawerLayout
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)
WindowCompat.setDecorFitsSystemWindows(window, false)
WindowInsetsControllerCompat(window, window.decorView).hide(WindowInsetsCompat.Type.statusBars())
result?.drawerLayout?.fitsSystemWindows = false
topbarSetting()
if (intent != null && intent.hasExtra("fragmentToOpen")) {
Expand Down

0 comments on commit 37cfc5a

Please sign in to comment.