refactor: set max messages const to 20

This commit is contained in:
Anna 2024-06-05 13:45:23 -04:00
parent 5826d3586f
commit 84bfd96b67
Signed by: anna
GPG Key ID: D0943384CD9F87D1
3 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,8 @@ using OrangeGuidanceTomestone.Helpers;
namespace OrangeGuidanceTomestone;
internal class Messages : IDisposable {
internal const uint MaxAmount = 20;
internal static readonly string[] VfxPaths = {
"bg/ffxiv/fst_f1/common/vfx/eff/b0941trp1a_o.avfx",
"bg/ffxiv/fst_f1/common/vfx/eff/b0941trp1b_o.avfx",

View File

@ -49,7 +49,7 @@ internal class MessageList : ITab {
}
private void ShowList() {
ImGui.TextUnformatted($"Messages: {this.Messages.Count:N0} / {10 + this.Plugin.Ui.MainWindow.ExtraMessages:N0}");
ImGui.TextUnformatted($"Messages: {this.Messages.Count:N0} / {Messages.MaxAmount + this.Plugin.Ui.MainWindow.ExtraMessages:N0}");
ImGui.Separator();

View File

@ -248,7 +248,7 @@ internal class Settings : ITab {
var text = await resp.Content.ReadAsStringAsync();
if (uint.TryParse(text, out var extra)) {
this.Plugin.Ui.MainWindow.ExtraMessages = extra;
this.Plugin.Ui.ShowModal($"Code claimed.\n\nYou can now post up to {10 + extra:N0} messages.");
this.Plugin.Ui.ShowModal($"Code claimed.\n\nYou can now post up to {Messages.MaxAmount + extra:N0} messages.");
} else {
this.Plugin.Ui.ShowModal("Code claimed but the server gave an unexpected response.");
}