0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-26 13:12:59 +00:00

crash fix attempt 2

This commit is contained in:
X1nto 2020-06-04 13:06:02 +04:00
parent cbaca950f9
commit 2441a2c8d3

View file

@ -41,10 +41,7 @@ class HomeFragment : Home() {
): View? {
activity?.title = getString(R.string.title_home)
setHasOptionsMenu(true)
val viewModel: HomeViewModel by viewModels()
binding = DataBindingUtil.inflate(inflater, R.layout.fragment_home, container, false)
binding.viewModel = viewModel
return binding.root
}
@ -52,6 +49,8 @@ class HomeFragment : Home() {
super.onViewCreated(view, savedInstanceState)
initNetworkFun()
val viewModel: HomeViewModel by viewModels()
binding.viewModel = viewModel
val variantPref = getDefaultSharedPreferences(activity).getString("vanced_variant", "Nonroot")