- 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">
|
<Project Sdk="Dalamud.NET.Sdk/15.0.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.35.0</Version>
|
<Version>1.35.1</Version>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ public class Processing
|
|||||||
{
|
{
|
||||||
if (chunk.Link is PlayerPayload playerPayload)
|
if (chunk.Link is PlayerPayload playerPayload)
|
||||||
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, playerPayload.PlayerName, playerPayload.World.RowId);
|
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, playerPayload.PlayerName, playerPayload.World.RowId);
|
||||||
else if (Plugin.ObjectTable.LocalPlayer is { } player)
|
else if (Plugin.PlayerState.IsLoaded)
|
||||||
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, player.Name.TextValue, player.HomeWorld.RowId);
|
userContent = HostContext.Core.Plugin.ChatLogWindow.HidePlayerInString(userContent, Plugin.PlayerState.CharacterName, Plugin.PlayerState.HomeWorld.RowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
var isNotUrl = text.Link is not UriPayload;
|
var isNotUrl = text.Link is not UriPayload;
|
||||||
|
|||||||
@@ -169,12 +169,16 @@ internal class MessageStore : IDisposable
|
|||||||
{
|
{
|
||||||
case <= 0:
|
case <= 0:
|
||||||
migrationsToDo.Add(Migrate0);
|
migrationsToDo.Add(Migrate0);
|
||||||
|
|
||||||
// Migration support was only added in version 1. Migrate 0 is
|
// Migration support was only added in version 1. Migrate 0 is
|
||||||
// idempotent.
|
// idempotent.
|
||||||
migrationsToDo.Add(Migrate1);
|
migrationsToDo.Add(Migrate1);
|
||||||
|
migrationsToDo.Add(Migrate2);
|
||||||
|
migrationsToDo.Add(Migrate3);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
migrationsToDo.Add(Migrate2);
|
migrationsToDo.Add(Migrate2);
|
||||||
|
migrationsToDo.Add(Migrate3);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
migrationsToDo.Add(Migrate3);
|
migrationsToDo.Add(Migrate3);
|
||||||
|
|||||||
Generated
+1
-1
@@ -3462,7 +3462,7 @@ namespace ChatTwo.Resources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
internal static string Options_Tabs_SenderMessages {
|
internal static string Options_Tabs_SenderMessages {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -1148,7 +1148,7 @@
|
|||||||
<value>Disable input for this channel</value>
|
<value>Disable input for this channel</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Options_Tabs_SenderMessages" xml:space="preserve">
|
<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>
|
||||||
<data name="ChatLog_DisabledInput" xml:space="preserve">
|
<data name="ChatLog_DisabledInput" xml:space="preserve">
|
||||||
<value>Input is disabled for this tab</value>
|
<value>Input is disabled for this tab</value>
|
||||||
|
|||||||
@@ -541,8 +541,8 @@ public class DbViewer : Window
|
|||||||
{
|
{
|
||||||
if (chunk.Link is PlayerPayload playerPayload)
|
if (chunk.Link is PlayerPayload playerPayload)
|
||||||
userContent = Plugin.ChatLogWindow.HidePlayerInString(userContent, playerPayload.PlayerName, playerPayload.World.RowId);
|
userContent = Plugin.ChatLogWindow.HidePlayerInString(userContent, playerPayload.PlayerName, playerPayload.World.RowId);
|
||||||
else if (Plugin.ObjectTable.LocalPlayer is { } player)
|
else if (Plugin.PlayerState.IsLoaded)
|
||||||
userContent = Plugin.ChatLogWindow.HidePlayerInString(userContent, player.Name.TextValue, player.HomeWorld.RowId);
|
userContent = Plugin.ChatLogWindow.HidePlayerInString(userContent, Plugin.PlayerState.CharacterName, Plugin.PlayerState.HomeWorld.RowId);
|
||||||
}
|
}
|
||||||
|
|
||||||
var isNotUrl = text.Link is not UriPayload;
|
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;
|
var player = Plugin.ObjectTable.LocalPlayer;
|
||||||
if (tab.Channel == InputChannel.Tell && player != null)
|
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();
|
var worlds = Sheets.WorldsOnDatacenter(player).OrderByDescending(world => world.DataCenter.RowId).ThenBy(world => world.Name.ToString()).ToList();
|
||||||
|
|
||||||
using (ImRaii.ItemWidth(ImGui.GetWindowWidth() / 3f))
|
using (ImRaii.ItemWidth(ImGui.GetWindowWidth() / 3f))
|
||||||
|
|||||||
Reference in New Issue
Block a user