Initialize migration. (#88)

Co-authored-by: defnotken <itsdefnotken@gmail.com>
Co-authored-by: cake <admin@cakeandbanana.nl>
Reviewed-on: #88
Reviewed-by: cake <cake@noreply.git.lightless-sync.org>
Co-authored-by: defnotken <defnotken@noreply.git.lightless-sync.org>
Co-committed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
This commit was merged in pull request #88.
This commit is contained in:
2025-11-29 18:02:39 +01:00
committed by cake
parent 9e12725f89
commit 740b58afc4
63 changed files with 1720 additions and 1005 deletions

View File

@@ -25,7 +25,6 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
private ChangelogFile _changelog = new();
private CreditsFile _credits = new();
private bool _scrollToTop;
private int _selectedTab;
private bool _hasInitializedCollapsingHeaders;
private struct Particle
@@ -160,7 +159,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
DrawParticleEffects(headerStart, extendedParticleSize);
}
private void DrawGradientBackground(Vector2 headerStart, Vector2 headerEnd)
private static void DrawGradientBackground(Vector2 headerStart, Vector2 headerEnd)
{
var drawList = ImGui.GetWindowDrawList();
@@ -188,7 +187,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
}
}
private void DrawBottomGradient(Vector2 headerStart, Vector2 headerEnd, float width)
private static void DrawBottomGradient(Vector2 headerStart, Vector2 headerEnd, float width)
{
var drawList = ImGui.GetWindowDrawList();
var gradientHeight = 60f;
@@ -513,7 +512,6 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
{
if (changelogTab)
{
_selectedTab = 0;
DrawChangelog();
}
}
@@ -524,7 +522,6 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
{
if (creditsTab)
{
_selectedTab = 1;
DrawCredits();
}
}
@@ -558,7 +555,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
}
}
private void DrawCreditCategory(CreditCategory category)
private static void DrawCreditCategory(CreditCategory category)
{
DrawFeatureSection(category.Category, UIColors.Get("LightlessBlue"));
@@ -745,7 +742,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
using var changelogStream = assembly.GetManifestResourceStream("LightlessSync.Changelog.changelog.yaml");
if (changelogStream != null)
{
using var reader = new StreamReader(changelogStream, Encoding.UTF8, true, 128);
using var reader = new StreamReader(changelogStream, Encoding.UTF8, detectEncodingFromByteOrderMarks: true, 128);
var yaml = reader.ReadToEnd();
_changelog = deserializer.Deserialize<ChangelogFile>(yaml) ?? new();
}
@@ -754,7 +751,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
using var creditsStream = assembly.GetManifestResourceStream("LightlessSync.Changelog.credits.yaml");
if (creditsStream != null)
{
using var reader = new StreamReader(creditsStream, Encoding.UTF8, true, 128);
using var reader = new StreamReader(creditsStream, Encoding.UTF8, detectEncodingFromByteOrderMarks: true, 128);
var yaml = reader.ReadToEnd();
_credits = deserializer.Deserialize<CreditsFile>(yaml) ?? new();
}