mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-18 00:22:48 +00:00
Use ValueTask instead of Task where possible
This commit is contained in:
@@ -23,7 +23,7 @@ namespace DiscordChatExporter.Gui.Services
|
||||
_settingsService = settingsService;
|
||||
}
|
||||
|
||||
public async Task<Version?> CheckForUpdatesAsync()
|
||||
public async ValueTask<Version?> CheckForUpdatesAsync()
|
||||
{
|
||||
if (!_settingsService.IsAutoUpdateEnabled)
|
||||
return null;
|
||||
@@ -32,7 +32,7 @@ namespace DiscordChatExporter.Gui.Services
|
||||
return check.CanUpdate ? check.LastVersion : null;
|
||||
}
|
||||
|
||||
public async Task PrepareUpdateAsync(Version version)
|
||||
public async ValueTask PrepareUpdateAsync(Version version)
|
||||
{
|
||||
if (!_settingsService.IsAutoUpdateEnabled)
|
||||
return;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Framework
|
||||
_viewManager = viewManager;
|
||||
}
|
||||
|
||||
public async Task<T> ShowDialogAsync<T>(DialogScreen<T> dialogScreen)
|
||||
public async ValueTask<T> ShowDialogAsync<T>(DialogScreen<T> dialogScreen)
|
||||
{
|
||||
// Get the view that renders this viewmodel
|
||||
var view = _viewManager.CreateAndBindViewForModelIfNecessary(dialogScreen);
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||
(sender, args) => IsProgressIndeterminate = ProgressManager.IsActive && ProgressManager.Progress.IsEither(0, 1));
|
||||
}
|
||||
|
||||
private async Task HandleAutoUpdateAsync()
|
||||
private async ValueTask HandleAutoUpdateAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user