~singpolyma/cheogram-android

50fb3b96ece526c8ef92a27ae0a1292c0dd5eb31 — Stephen Paul Weber 1 year, 5 months ago a8322c0
Hide menu and fab when onboarding
M src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java => src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java +1 -1
@@ 492,7 492,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
        getMenuInflater().inflate(R.menu.activity_conversations, menu);
        final MenuItem qrCodeScanMenuItem = menu.findItem(R.id.action_scan_qr_code);
        if (qrCodeScanMenuItem != null) {
            if (isCameraFeatureAvailable()) {
            if (isCameraFeatureAvailable() && (xmppConnectionService == null || !xmppConnectionService.isOnboarding())) {
                Fragment fragment = getFragmentManager().findFragmentById(R.id.main_fragment);
                boolean visible = getResources().getBoolean(R.bool.show_qr_code_scan)
                        && fragment instanceof ConversationsOverviewFragment;

M src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java => src/main/java/eu/siacs/conversations/ui/ConversationsOverviewFragment.java +12 -0
@@ 316,6 316,13 @@ public class ConversationsOverviewFragment extends XmppFragment {
		AccountUtils.showHideMenuItems(menu);
		final MenuItem easyOnboardInvite = menu.findItem(R.id.action_easy_invite);
		easyOnboardInvite.setVisible(EasyOnboardingInvite.anyHasSupport(activity == null ? null : activity.xmppConnectionService));
		if (activity.xmppConnectionService != null && activity.xmppConnectionService.isOnboarding()) {
			final MenuItem manageAccounts = menu.findItem(R.id.action_accounts);
			if (manageAccounts != null) manageAccounts.setVisible(false);

			final MenuItem settings = menu.findItem(R.id.action_settings);
			if (settings != null) settings.setVisible(false);
		}
	}

	 @Override


@@ 380,6 387,11 @@ public class ConversationsOverviewFragment extends XmppFragment {
	@Override
	public void onBackendConnected() {
		refresh();
		if (activity.xmppConnectionService.isOnboarding()) {
			binding.fab.setVisibility(View.GONE);
		} else {
			binding.fab.setVisibility(View.VISIBLE);
		}
	}

	@Override