private void EnsureCorrectState ()
{
// Set toolbar scrollable or not.
var _params = new AppBarLayout.LayoutParams (toolBar.LayoutParameters);
if (viewModel.ProjectList.Workspaces.Count > 1) {
tabLayout.Visibility = ViewStates.Visible;
_params.ScrollFlags = AppBarLayout.LayoutParams.ScrollFlagScroll | AppBarLayout.LayoutParams.ScrollFlagEnterAlways;
} else {
tabLayout.Visibility = ViewStates.Gone;
_params.ScrollFlags = 0;
}
toolBar.LayoutParameters = _params;
recyclerView.Visibility = viewModel.ProjectList.IsEmpty ? ViewStates.Gone : ViewStates.Visible;
emptyStateLayout.Visibility = viewModel.ProjectList.IsEmpty ? ViewStates.Visible : ViewStates.Gone;
}