private void EnableMenuForCapability(PageCapability capability) { var enable = !(capability.requireUserLoggedIn && !m_UnityConnect.isUserLoggedIn) && !(capability.requireNetwork && !m_Application.isInternetReachable); orderingMenu.SetEnabled(enable); filtersMenu.SetEnabled(enable); clearFiltersButton.SetEnabled(enable); searchToolbar.SetEnabled(enable); }
protected BasePage(PackageDatabase packageDatabase, PackageFilterTab tab, PageCapability capability) { ResolveDependencies(packageDatabase); m_Tab = tab; m_Capability = capability; if (m_Filters == null) { var defaultOrdering = m_Capability?.orderingValues?.FirstOrDefault(); m_Filters = new PageFilters { orderBy = defaultOrdering?.orderBy, isReverseOrder = false }; } }