mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
improve room database flow
This commit is contained in:
parent
6678a82578
commit
1196eb6cc5
3 changed files with 22 additions and 17 deletions
|
|
@ -5,7 +5,7 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.lifecycle.asLiveData
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
|
@ -22,19 +22,15 @@ class DebugFragment : Fragment() {
|
|||
// This property is only valid between onCreateView and onDestroyView.
|
||||
private val binding get() = _binding!!
|
||||
|
||||
// FIXME hacky way to grab packets re-creating UIViewModel instead of using activityViewModels()
|
||||
private val model: UIViewModel by viewModels()
|
||||
private val model: UIViewModel by activityViewModels()
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
): View {
|
||||
_binding = DebugFragmentBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
//Button to clear All log
|
||||
|
||||
//List all log
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue