Fix build warnings for fun
This commit is contained in:
@@ -13,14 +13,16 @@ internal sealed partial class CharaDataHubUi
|
||||
AccessTypeDto.AllPairs => "All Pairs",
|
||||
AccessTypeDto.ClosePairs => "Direct Pairs",
|
||||
AccessTypeDto.Individuals => "Specified",
|
||||
AccessTypeDto.Public => "Everyone"
|
||||
AccessTypeDto.Public => "Everyone",
|
||||
_ => ((int)dto).ToString()
|
||||
};
|
||||
|
||||
private static string GetShareTypeString(ShareTypeDto dto) => dto switch
|
||||
{
|
||||
ShareTypeDto.Private => "Code Only",
|
||||
ShareTypeDto.Shared => "Shared"
|
||||
};
|
||||
{
|
||||
ShareTypeDto.Private => "Code Only",
|
||||
ShareTypeDto.Shared => "Shared",
|
||||
_ => ((int)dto).ToString()
|
||||
};
|
||||
|
||||
private static string GetWorldDataTooltipText(PoseEntryExtended poseEntry)
|
||||
{
|
||||
|
||||
@@ -480,8 +480,8 @@ internal sealed partial class CharaDataHubUi
|
||||
ImGui.SameLine();
|
||||
ImGuiHelpers.ScaledDummy(10, 1);
|
||||
ImGui.SameLine();
|
||||
var worldData = pose.WorldData;
|
||||
bool hasWorldData = (worldData ?? default) != default;
|
||||
var worldData = pose.WorldData ?? default;
|
||||
bool hasWorldData = worldData != default;
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Globe, UiSharedService.GetBoolColor(hasWorldData));
|
||||
var tooltipText = !hasWorldData ? "This Pose has no world data attached." : "This Pose has world data attached.";
|
||||
if (hasWorldData)
|
||||
@@ -491,8 +491,8 @@ internal sealed partial class CharaDataHubUi
|
||||
UiSharedService.AttachToolTip(tooltipText);
|
||||
if (hasWorldData && ImGui.IsItemClicked(ImGuiMouseButton.Left))
|
||||
{
|
||||
_dalamudUtilService.SetMarkerAndOpenMap(position: new Vector3(worldData.Value.PositionX, worldData.Value.PositionY, worldData.Value.PositionZ),
|
||||
_dalamudUtilService.MapData.Value[worldData.Value.LocationInfo.MapId].Map);
|
||||
_dalamudUtilService.SetMarkerAndOpenMap(position: new Vector3(worldData.PositionX, worldData.PositionY, worldData.PositionZ),
|
||||
_dalamudUtilService.MapData.Value[worldData.LocationInfo.MapId].Map);
|
||||
}
|
||||
ImGui.SameLine();
|
||||
using (ImRaii.Disabled(!_uiSharedService.IsInGpose || !(_charaDataManager.AttachingPoseTask?.IsCompleted ?? true) || !_charaDataManager.BrioAvailable))
|
||||
|
||||
@@ -27,7 +27,7 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
|
||||
Pair = pair;
|
||||
_uiSharedService = uiSharedService;
|
||||
_apiController = apiController;
|
||||
_ownPermissions = pair.UserPair.OwnPermissions.DeepClone();
|
||||
_ownPermissions = pair.UserPair?.OwnPermissions.DeepClone() ?? default;
|
||||
Flags = ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoResize;
|
||||
SizeConstraints = new()
|
||||
{
|
||||
@@ -49,6 +49,9 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
|
||||
_uiSharedService.BigText("Permissions for " + Pair.UserData.AliasOrUID);
|
||||
ImGuiHelpers.ScaledDummy(1f);
|
||||
|
||||
if (Pair.UserPair == null)
|
||||
return;
|
||||
|
||||
if (ImGui.Checkbox("Pause Sync", ref paused))
|
||||
{
|
||||
_ownPermissions.SetPaused(paused);
|
||||
|
||||
@@ -351,7 +351,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
using var pushId = ImRaii.PushId(bannedUser.UID);
|
||||
if (_uiSharedService.IconTextButton(FontAwesomeIcon.Check, "Unban"))
|
||||
{
|
||||
_apiController.GroupUnbanUser(bannedUser);
|
||||
Task.Run(async () => await _apiController.GroupUnbanUser(bannedUser));
|
||||
_bannedUsers.RemoveAll(b => string.Equals(b.UID, bannedUser.UID, StringComparison.Ordinal));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
}
|
||||
|
||||
public T? DrawColorCombo<T>(string comboName, IEnumerable<T> comboItems, Func<T, (uint Color, string Name)> toEntry,
|
||||
Action<T>? onSelected = null, T? initialSelectedItem = default)
|
||||
Action<T?>? onSelected = null, T? initialSelectedItem = default)
|
||||
{
|
||||
if (!comboItems.Any()) return default;
|
||||
|
||||
@@ -689,7 +689,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
{
|
||||
entry = toEntry(item);
|
||||
ImGui.PushStyleColor(ImGuiCol.Text, ColorHelpers.RgbaUintToVector4(ColorHelpers.SwapEndianness(entry.Color)));
|
||||
bool isSelected = EqualityComparer<T>.Default.Equals(item, (T)selectedItem);
|
||||
bool isSelected = EqualityComparer<T>.Default.Equals(item, (T)selectedItem!);
|
||||
if (ImGui.Selectable(entry.Name, isSelected))
|
||||
{
|
||||
_selectedComboItems[comboName] = item!;
|
||||
|
||||
Reference in New Issue
Block a user