patch notes setup, added some of the older patchnotes into a changelog.yaml
This commit is contained in:
@@ -155,6 +155,24 @@ public class LightlessPlugin : MediatorSubscriberBase, IHostedService
|
||||
_runtimeServiceScope.ServiceProvider.GetRequiredService<NotificationService>();
|
||||
_runtimeServiceScope.ServiceProvider.GetRequiredService<NameplateService>();
|
||||
|
||||
// TODO: move this to a better place
|
||||
var ver = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
var currentVersion = ver == null ? string.Empty : $"{ver.Major}.{ver.Minor}.{ver.Build}";
|
||||
var lastSeen = _lightlessConfigService.Current.LastSeenVersion ?? string.Empty;
|
||||
Logger?.LogDebug("Last seen version: {lastSeen}, current version: {currentVersion}", lastSeen, currentVersion);
|
||||
if (string.IsNullOrEmpty(lastSeen))
|
||||
{
|
||||
_lightlessConfigService.Current.LastSeenVersion = currentVersion;
|
||||
_lightlessConfigService.Save();
|
||||
}
|
||||
else if (!string.Equals(lastSeen, currentVersion, StringComparison.Ordinal))
|
||||
{
|
||||
// TODO: actually check if setup is complete
|
||||
Mediator.Publish(new UiToggleMessage(typeof(UpdateNotesUi)));
|
||||
_lightlessConfigService.Current.LastSeenVersion = currentVersion;
|
||||
_lightlessConfigService.Save();
|
||||
}
|
||||
|
||||
#if !DEBUG
|
||||
if (_lightlessConfigService.Current.LogLevel != LogLevel.Information)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user