Source:
<code>private void initViewModel() { mFloatingActionButton = findViewById(R.id.fab_button); mFabTooltip = findViewById(R.id.fab_tooltip); mViewModel = ViewModelProviders.of(this, mViewModelFactory).get(WPMainActivityViewModel.class); if (BuildConfig.INFORMATION_ARCHITECTURE_AVAILABLE) { <START> mViewModel.getShowMainActionFab().observe(this, showUiState -> { <END> if (showUiState.isFabVisible()) { mFloatingActionButton.show(); } else { mFloatingActionButton.hide(); } if (showUiState.isFabTooltipVisible()) { mFabTooltip.show(); } else { mFabTooltip.hide(); } }); mViewModel.getCreateAction().observe(this, createAction -> { switch (createAction) { case CREATE_NEW_POST: handleNewPostAction(PagePostCreationSourcesDetail.POST_FROM_MY_SITE); break; case CREATE_NEW_PAGE: handleNewPageAction(PagePostCreationSourcesDetail.PAGE_FROM_MY_SITE); break; } }); mFloatingActionButton.setOnClickListener(v -> { mViewModel.setIsBottomSheetShowing(true); }); mViewModel.isBottomSheetShowing().observe(this, event -> { event.applyIfNotHandled(isShowing -> { FragmentManager fm = getSupportFragmentManager(); if (fm != null) { MainBottomSheetFragment bottomSheet = (MainBottomSheetFragment) fm.findFragmentByTag(MAIN_BOTTOM_SHEET_TAG); if (isShowing && bottomSheet == null) { bottomSheet = new MainBottomSheetFragment(); bottomSheet.show(getSupportFragmentManager(), MAIN_BOTTOM_SHEET_TAG); } else if (!isShowing && bottomSheet != null) { bottomSheet.dismiss(); } } return null; }); }); } mViewModel.start(mBottomNav.getCurrentSelectedPage() == PageType.MY_SITE); }</code><technical_language>call fabUiState instead of showUiState</technical_language>

Target:
private void initViewModel() { mFloatingActionButton = findViewById(R.id.fab_button); mFabTooltip = findViewById(R.id.fab_tooltip); mViewModel = ViewModelProviders.of(this, mViewModelFactory).get(WPMainActivityViewModel.class); if (BuildConfig.INFORMATION_ARCHITECTURE_AVAILABLE) { mViewModel.getFabUiState().observe(this, fabUiState -> { if (fabUiState.isFabTooltipVisible()) { mFabTooltip.show(); } else { mFabTooltip.hide(); } if (fabUiState.isFabVisible()) { mFloatingActionButton.show(); } else { mFloatingActionButton.hide(); } }); mViewModel.getCreateAction().observe(this, createAction -> { switch (createAction) { case CREATE_NEW_POST: handleNewPostAction(PagePostCreationSourcesDetail.POST_FROM_MY_SITE); break; case CREATE_NEW_PAGE: handleNewPageAction(PagePostCreationSourcesDetail.PAGE_FROM_MY_SITE); break; } }); mFloatingActionButton.setOnClickListener(v -> { mViewModel.setIsBottomSheetShowing(true); }); mFabTooltip.setOnClickListener(v -> { mViewModel.onTooltipTapped(); }); mViewModel.isBottomSheetShowing().observe(this, event -> { event.applyIfNotHandled(isShowing -> { FragmentManager fm = getSupportFragmentManager(); if (fm != null) { MainBottomSheetFragment bottomSheet = (MainBottomSheetFragment) fm.findFragmentByTag(MAIN_BOTTOM_SHEET_TAG); if (isShowing && bottomSheet == null) { bottomSheet = new MainBottomSheetFragment(); bottomSheet.show(getSupportFragmentManager(), MAIN_BOTTOM_SHEET_TAG); } else if (!isShowing && bottomSheet != null) { bottomSheet.dismiss(); } } return null; }); }); } mViewModel.start(mBottomNav.getCurrentSelectedPage() == PageType.MY_SITE); }