Skip to content

Commit

Permalink
[app] load ops on Activity start not resume
Browse files Browse the repository at this point in the history
  • Loading branch information
Tornaco committed Feb 28, 2022
1 parent 128ad6a commit d236cbc
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
return binding.getRoot();
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
viewModel.start();
}

private void setupView() {
binding.toolbar.setTitle(getString(R.string.module_ops_feature_title_ops_app_list));

Expand Down Expand Up @@ -113,12 +119,6 @@ private void setupViewModel() {
binding.executePendingBindings();
}

@Override
public void onResume() {
super.onResume();
viewModel.start();
}

public static AllOpsListViewModel obtainViewModel(FragmentActivity activity) {
ViewModelProvider.AndroidViewModelFactory factory = ViewModelProvider.AndroidViewModelFactory
.getInstance(activity.getApplication());
Expand Down

0 comments on commit d236cbc

Please sign in to comment.