[CHANGE] Remove anon accounts && added simple caching for urls
This commit is contained in:
@@ -13,7 +13,7 @@ public partial class Channels : ComponentBase
|
||||
|
||||
private async Task<TableData<ChannelEntity>> ServerReload(TableState state, CancellationToken token)
|
||||
{
|
||||
var results = await LibraryService.GetChannelAccountsAsync(state.PageSize, state.Page * state.PageSize, token);
|
||||
var results = await LibraryService.GetChannelsAsync(state.PageSize, state.Page * state.PageSize, token);
|
||||
return !results.IsSuccess ? new TableData<ChannelEntity>() : new TableData<ChannelEntity> { Items = results.Value, TotalItems = results.Total };
|
||||
}
|
||||
|
||||
@@ -42,12 +42,11 @@ public partial class Channels : ComponentBase
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_table != null)
|
||||
{
|
||||
await _table.ReloadServerData();
|
||||
}
|
||||
Snackbar.Add($"Client {clientPrep.Channel?.Handle ?? clientPrep.YouTubeClient.Id} saved!", Severity.Success);
|
||||
}
|
||||
|
||||
if (_table != null)
|
||||
{
|
||||
await _table.ReloadServerData();
|
||||
}
|
||||
}
|
||||
}
|
@@ -27,7 +27,9 @@ public partial class Services : ComponentBase
|
||||
private List<ServiceEvent> GetInitialEvents()
|
||||
{
|
||||
var totalToGet = 1000 / _backgroundServices.Count;
|
||||
var initial = _backgroundServices.SelectMany(x => x.ProgressEvents.Items.TakeLast(totalToGet));
|
||||
var initial = _backgroundServices
|
||||
.SelectMany(x => x.ProgressEvents.Items.TakeLast(totalToGet))
|
||||
.OrderBy(x => x.DateUtc);
|
||||
return initial.ToList();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user