Skip to content

Commit cbc732d

Browse files
committed
Make branch detection warnings less annoying
1 parent f03e437 commit cbc732d

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

CustomizePlus/Core/Services/Dalamud/DalamudBranchService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class DalamudBranchService : IService
99
/// Message used in various places to tell user why the plugin is disabled
1010
/// </summary>
1111
public const string PluginDisabledMessage = "You are running development or testing version of Dalamud.\n" +
12-
"Regular users are not supposed to run Customize+ on non-release versions of Dalamud therefore Customize+ has disabled itself.";
12+
"Regular users are not supposed to run Customize+ on non-release versions of Dalamud therefore Customize+ has disabled itself until you go back to stable version.";
1313

1414
/// <summary>
1515
/// Current Dalamud branch

CustomizePlus/Core/Services/UserNotifierService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ private void NotifyUser(bool displayOptionalMessages = false)
5454

5555
if (displayOptionalMessages)
5656
{
57-
UIGlobals.PlayChatSoundEffect(11);
58-
_popupSystem.ShowPopup(PopupSystem.Messages.PluginDisabledNonReleaseDalamud);
57+
if(_popupSystem.ShowPopup(PopupSystem.Messages.PluginDisabledNonReleaseDalamud))
58+
UIGlobals.PlayChatSoundEffect(11);
5959
}
6060
}
6161
}

CustomizePlus/UI/Windows/PopupSystem.Messages.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private void RegisterMessages()
4747
RegisterPopup(Messages.ClipboardDataUnsupported, "Clipboard data you are trying to use cannot be used in this version of Customize+.");
4848

4949
RegisterPopup(Messages.ClipboardDataNotLongTerm, "Warning: clipboard data is not designed to be used as long-term way of storing your templates.\nCompatibility of copied data between different Customize+ versions is not guaranteed.", true, new Vector2(5, 10));
50-
51-
RegisterPopup(Messages.PluginDisabledNonReleaseDalamud, DalamudBranchService.PluginDisabledMessage, false, new Vector2(5, 8));
50+
51+
RegisterPopup(Messages.PluginDisabledNonReleaseDalamud, DalamudBranchService.PluginDisabledMessage + "\nThis window will not be shown again.", true, new Vector2(5, 8));
5252
}
5353
}

CustomizePlus/UI/Windows/PopupSystem.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ public void RegisterPopup(string name, string text, bool displayOnce = false, Ve
3838
_logger.Debug($"Popup \"{name}\" registered");
3939
}
4040

41-
public void ShowPopup(string name)
41+
/// <summary>
42+
/// Show popup. Returns false if popup will not be shown for some reason. (can only be shown once or awaiting to be shown)
43+
/// </summary>
44+
public bool ShowPopup(string name)
4245
{
4346
name = name.ToLowerInvariant();
4447

@@ -47,12 +50,14 @@ public void ShowPopup(string name)
4750

4851
var popup = _popups[name];
4952

50-
if (popup.DisplayRequested || _configuration.UISettings.ViewedMessageWindows.Contains(name))
51-
return;
53+
if (popup.DisplayRequested || (popup.DisplayOnce && _configuration.UISettings.ViewedMessageWindows.Contains(name)))
54+
return false;
5255

5356
popup.DisplayRequested = true;
5457

5558
//_logger.Debug($"Popup \"{name}\" set as requested to be displayed");
59+
60+
return true;
5661
}
5762

5863
public void Draw()

0 commit comments

Comments
 (0)