Merge pull request #203 from FineFindus/feat/instance-info-improvements

fix(instance-info): hide menu until loaded
This commit is contained in:
LucasGGamerM 2023-05-27 09:44:34 -03:00 committed by GitHub
commit fd97cc6e87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -163,6 +163,7 @@ public class InstanceInfoFragment extends LoaderFragment {
instance = result;
bindViews();
dataLoaded();
invalidateOptionsMenu();
if(refreshing) {
refreshing = false;
refreshLayout.setRefreshing(false);
@ -327,8 +328,10 @@ public class InstanceInfoFragment extends LoaderFragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){
inflater.inflate(R.menu.instance_info, menu);
UiUtils.enableOptionsMenuIcons(getActivity(), menu);
if (instance != null) {
inflater.inflate(R.menu.instance_info, menu);
UiUtils.enableOptionsMenuIcons(getActivity(), menu);
}
}
@Override