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:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user