Экран логов открываеться ура ура
This commit is contained in:
parent
9d3708a95c
commit
eb690b6908
@ -1,6 +1,7 @@
|
|||||||
package ru.myitschool.work.ui.profile
|
package ru.myitschool.work.ui.profile
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
@ -74,8 +75,9 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
|
|||||||
popUpTo<ProfileDestination> { inclusive = true }
|
popUpTo<ProfileDestination> { inclusive = true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is ProfileViewModel.Action.OpenLog -> {
|
is ProfileViewModel.Action.OpenLog -> {
|
||||||
findNavController().navigate(LoginDestination) {
|
findNavController().navigate(EntryListDestination) {
|
||||||
popUpTo<EntryListDestination> { inclusive = true }
|
popUpTo<EntryListDestination> { inclusive = true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,6 +88,7 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
|
|||||||
navigate(QrScanDestination)
|
navigate(QrScanDestination)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,6 +96,7 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
|
|||||||
private fun initCallback() {
|
private fun initCallback() {
|
||||||
binding.logout.setOnClickListener { viewModel.clickLogout() }
|
binding.logout.setOnClickListener { viewModel.clickLogout() }
|
||||||
binding.scan.setOnClickListener { viewModel.clickScan() }
|
binding.scan.setOnClickListener { viewModel.clickScan() }
|
||||||
|
binding.entryList.setOnClickListener{ viewModel.clickLog()}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user