This commit is contained in:
Tyrrrz
2023-05-20 07:09:19 +03:00
parent 03c5c1bc5e
commit 31c7ae9312
50 changed files with 181 additions and 198 deletions

View File

@@ -156,14 +156,11 @@ public class DashboardViewModel : PropertyChangedBase
var exporter = new ChannelExporter(_discord);
var channelProgressPairs = dialog
.Channels!
.Select(c => new
{
Channel = c,
Progress = _progressMuxer.CreateInput()
})
.ToArray();
var channelProgressPairs = dialog.Channels!.Select(c => new
{
Channel = c,
Progress = _progressMuxer.CreateInput()
}).ToArray();
var successfulExportCount = 0;
@@ -213,7 +210,7 @@ public class DashboardViewModel : PropertyChangedBase
}
);
// Notify of overall completion
// Notify of the overall completion
if (successfulExportCount > 0)
{
_eventAggregator.Publish(

View File

@@ -25,7 +25,7 @@ public class DialogManager : IDisposable
void OnDialogOpened(object? openSender, DialogOpenedEventArgs openArgs)
{
void OnScreenClosed(object? closeSender, EventArgs args)
void OnScreenClosed(object? closeSender, EventArgs closeArgs)
{
try
{

View File

@@ -1,8 +1,3 @@
namespace DiscordChatExporter.Gui.ViewModels.Messages;
public class NotificationMessage
{
public string Text { get; }
public NotificationMessage(string text) => Text = text;
}
public record NotificationMessage(string Text);

View File

@@ -62,9 +62,7 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
_settingsService.Save();
if (await _dialogManager.ShowDialogAsync(dialog) == true)
{
ProcessEx.StartShellExecute("https://tyrrrz.me/ukraine?source=discordchatexporter");
}
}
private async ValueTask CheckForUpdatesAsync()
@@ -106,7 +104,7 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
_settingsService.Load();
// Sync theme with settings
// Sync the theme with settings
if (_settingsService.IsDarkModeEnabled)
{
App.SetDarkTheme();
@@ -116,7 +114,7 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
App.SetLightTheme();
}
// App has just been updated, display changelog
// App has just been updated, display the changelog
if (_settingsService.LastAppVersion is not null && _settingsService.LastAppVersion != App.Version)
{
Notifications.Enqueue(
@@ -137,8 +135,7 @@ public class RootViewModel : Screen, IHandle<NotificationMessage>, IDisposable
_updateService.FinalizeUpdate(false);
}
public void Handle(NotificationMessage message) =>
Notifications.Enqueue(message.Text);
public void Handle(NotificationMessage message) => Notifications.Enqueue(message.Text);
public void Dispose() => Notifications.Dispose();
}