Added count to lightfinder label (#110)

[[https://lightless.media/u/3J6Um2OI.png](url)](https://lightless.media/u/3J6Um2OI.png)

Co-authored-by: cake <admin@cakeandbanana.nl>
Reviewed-on: #110
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
This commit was merged in pull request #110.
This commit is contained in:
2025-12-26 20:43:09 +00:00
parent 6546a658f3
commit 65dea18f5f

View File

@@ -781,7 +781,8 @@ public class TopTabMenu
{
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)));
}
@@ -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()
{
if (!_lightFinderService.IsBroadcasting)