- Fix migration not running for new users
- Use PlayerState for character
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Dalamud.NET.Sdk/15.0.0">
|
||||
<PropertyGroup>
|
||||
<Version>1.35.0</Version>
|
||||
<Version>1.35.1</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ public class Processing
|
||||
{
|
||||
if (chunk.Link is PlayerPayload playerPayload)
|
||||
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, playerPayload.PlayerName, playerPayload.World.RowId);
|
||||
else if (Plugin.ObjectTable.LocalPlayer is { } player)
|
||||
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, player.Name.TextValue, player.HomeWorld.RowId);
|
||||
else if (Plugin.PlayerState.IsLoaded)
|
||||
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, Plugin.PlayerState.CharacterName, Plugin.PlayerState.HomeWorld.RowId);
|
||||
}
|
||||
|
||||
var isNotUrl = text.Link is not UriPayload;
|
||||
|
||||
@@ -169,12 +169,16 @@ internal class MessageStore : IDisposable
|
||||
{
|
||||
case <= 0:
|
||||
migrationsToDo.Add(Migrate0);
|
||||
|
||||
// Migration support was only added in version 1. Migrate 0 is
|
||||
// idempotent.
|
||||
migrationsToDo.Add(Migrate1);
|
||||
migrationsToDo.Add(Migrate2);
|
||||
migrationsToDo.Add(Migrate3);
|
||||
break;
|
||||
case 1:
|
||||
migrationsToDo.Add(Migrate2);
|
||||
migrationsToDo.Add(Migrate3);
|
||||
break;
|
||||
case 2:
|
||||
migrationsToDo.Add(Migrate3);
|
||||
|
||||
Generated
+1
-1
@@ -3462,7 +3462,7 @@ namespace ChatTwo.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show all messages send by target.
|
||||
/// Looks up a localized string similar to Show all messages sent by target.
|
||||
/// </summary>
|
||||
internal static string Options_Tabs_SenderMessages {
|
||||
get {
|
||||
|
||||
@@ -1148,7 +1148,7 @@
|
||||
<value>Disable input for this channel</value>
|
||||
</data>
|
||||
<data name="Options_Tabs_SenderMessages" xml:space="preserve">
|
||||
<value>Show all messages send by target</value>
|
||||
<value>Show all messages sent by target</value>
|
||||
</data>
|
||||
<data name="ChatLog_DisabledInput" xml:space="preserve">
|
||||
<value>Input is disabled for this tab</value>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user