Bottom nav fix

This commit is contained in:
Universall 2025-02-20 16:40:53 +03:00
parent 03b87095cc
commit 935806770a
4 changed files with 13 additions and 5 deletions

View File

@ -42,7 +42,7 @@ class AdminFragment : Fragment(R.layout.fragment_admin) {
putSerializable("user", userDto)
putBoolean("isMe", false)
}
navigateTo(view, R.id.action_adminFragment_to_profileFragment, bundle)
navigateTo(view, R.id.action_nav_admin_to_nav_user_profile, bundle)
}
if (state is AdminViewModel.State.Error){
val errorMessage = state.errorMessage

View File

@ -53,7 +53,7 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
showData(getUserDto()!!)
binding.backToSearch.visibility = View.VISIBLE
binding.backToSearch.setOnClickListener {
navigateTo(view, R.id.action_profileFragment_to_adminFragment)
navigateTo(view, R.id.action_nav_user_profile_to_nav_admin)
}
Log.d("ProfileFragment", "set login")
viewModel.visitListStateFromLogin.collectWithLifecycle(this) { data ->

View File

@ -34,7 +34,7 @@ class ProfileViewModel() : ViewModel() {
var visitListState = Pager(
config = PagingConfig(
pageSize = 20,
pageSize = 3,
enablePlaceholders = false,
maxSize = 100
)

View File

@ -35,6 +35,14 @@
android:id="@+id/action_profileFragment_to_adminFragment"
app:destination="@id/nav_admin" />
</fragment>
<fragment
android:id="@+id/nav_user_profile"
android:name="com.displaynone.acss.ui.profile.ProfileFragment"
android:label="@string/title_profile" >
<action
android:id="@+id/action_nav_user_profile_to_nav_admin"
app:destination="@id/nav_admin" />
</fragment>
<fragment
android:id="@+id/nav_auth"
android:name="com.displaynone.acss.ui.auth.AuthFragment"
@ -64,7 +72,7 @@
android:name="com.displaynone.acss.ui.admin.AdminFragment"
android:label="@string/AdminFragment" >
<action
android:id="@+id/action_adminFragment_to_profileFragment"
app:destination="@id/nav_profile" />
android:id="@+id/action_nav_admin_to_nav_user_profile"
app:destination="@id/nav_user_profile" />
</fragment>
</navigation>