SHOWING changelog everytime till the got it button is pressed, should reappear on version updates according to the current settings

This commit is contained in:
choco
2025-10-16 23:03:32 +02:00
parent 9170b5205c
commit 8fdff1eb18
2 changed files with 14 additions and 14 deletions

View File

@@ -20,6 +20,7 @@ namespace LightlessSync.UI;
public class UpdateNotesUi : WindowMediatorSubscriberBase
{
private readonly UiSharedService _uiShared;
private readonly LightlessConfigService _configService;
private ChangelogFile _changelog = new();
private CreditsFile _credits = new();
@@ -65,6 +66,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
: base(logger, mediator, "Lightless Sync — Update Notes", performanceCollectorService)
{
_uiShared = uiShared;
_configService = configService;
AllowClickthrough = false;
AllowPinning = false;
@@ -576,6 +578,12 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
{
if (ImGui.Button("Got it!", new Vector2(closeWidth, closeHeight)))
{
// Update last seen version when user acknowledges the update notes
var ver = Assembly.GetExecutingAssembly().GetName().Version;
var currentVersion = ver == null ? string.Empty : $"{ver.Major}.{ver.Minor}.{ver.Build}";
_configService.Current.LastSeenVersion = currentVersion;
_configService.Save();
IsOpen = false;
}
}