Esempio n. 1
0
        protected override async Task OnInitializedAsync()
        {
            if (MyText is not null)
            {
                _currentHeader = MyText.HeaderShowDashboardBase;
            }

            if (LocalStorage is not null)
            {
                _currentTranslations = LocalStorage.GetItem <bool>(Const.CurrentTranslations);
                _itemsPerPage        = LocalStorage.ContainKey(Const.ItemsPerPageKey)
                    ? LocalStorage.GetItem <long>(Const.ItemsPerPageKey)
                    : Const.DefaultItemsPerPage;
                UpdateTheme();
            }
            if (!LanguagesState?.Value?.Languages.Any() ?? true)
            {
                Dispatcher?.Dispatch(new LanguagesFetchDataAction(LocalStorage));
            }

            await base.OnInitializedAsync();
        }