Added count to lightfinder label

This commit is contained in:
cake
2025-12-26 19:57:14 +01:00
parent 1a2885fd74
commit 2fc4b17614

View File

@@ -781,7 +781,8 @@ public class TopTabMenu
{ {
var buttonX = (availableWidth - (spacingX)) / 2f; var buttonX = (availableWidth - (spacingX)) / 2f;
if (_uiSharedService.IconTextButton(FontAwesomeIcon.PersonCirclePlus, "Lightfinder", buttonX, center: true)) var lightFinderLabel = GetLightfinderFinderLabel();
if (_uiSharedService.IconTextButton(FontAwesomeIcon.PersonCirclePlus, lightFinderLabel, buttonX, center: true))
{ {
_lightlessMediator.Publish(new UiToggleMessage(typeof(LightFinderUI))); _lightlessMediator.Publish(new UiToggleMessage(typeof(LightFinderUI)));
} }
@@ -795,6 +796,20 @@ public class TopTabMenu
} }
} }
private string GetLightfinderFinderLabel()
{
string label = "Lightfinder";
if (_lightFinderService.IsBroadcasting)
{
var hashExclude = _dalamudUtilService.GetCID().ToString().GetHash256();
var nearbyCount = _lightFinderScannerService.GetActiveBroadcasts(hashExclude).Count;
return $"{label} ({nearbyCount})";
}
return label;
}
private string GetSyncshellFinderLabel() private string GetSyncshellFinderLabel()
{ {
if (!_lightFinderService.IsBroadcasting) if (!_lightFinderService.IsBroadcasting)