- Fix migration not running for new users

- Use PlayerState for character
This commit is contained in:
Infi
2026-04-30 18:14:15 +02:00
parent b4cb8b25ec
commit dcf77e27f2
7 changed files with 15 additions and 11 deletions
+2 -2
View File
@@ -541,8 +541,8 @@ public class DbViewer : Window
{
if (chunk.Link is PlayerPayload playerPayload)
userContent = Plugin.ChatLogWindow.HidePlayerInString(userContent, playerPayload.PlayerName, playerPayload.World.RowId);
else if (Plugin.ObjectTable.LocalPlayer is { } player)
userContent = Plugin.ChatLogWindow.HidePlayerInString(userContent, player.Name.TextValue, player.HomeWorld.RowId);
else if (Plugin.PlayerState.IsLoaded)
userContent = Plugin.ChatLogWindow.HidePlayerInString(userContent, Plugin.PlayerState.CharacterName, Plugin.PlayerState.HomeWorld.RowId);
}
var isNotUrl = text.Link is not UriPayload;
+3 -3
View File
@@ -159,12 +159,12 @@ internal sealed class Tabs : ISettingsTab
}
}
ImGui.Checkbox(Language.Options_Tabs_SenderMessages, ref tab.AllSenderMessages);
ImGuiUtil.HelpText(Language.Options_Help_SenderMessages);
var player = Plugin.ObjectTable.LocalPlayer;
if (tab.Channel == InputChannel.Tell && player != null)
{
ImGui.Checkbox(Language.Options_Tabs_SenderMessages, ref tab.AllSenderMessages);
ImGuiUtil.HelpText(Language.Options_Help_SenderMessages);
var worlds = Sheets.WorldsOnDatacenter(player).OrderByDescending(world => world.DataCenter.RowId).ThenBy(world => world.Name.ToString()).ToList();
using (ImRaii.ItemWidth(ImGui.GetWindowWidth() / 3f))