init 2
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface;
|
||||
using LightlessSync.API.Dto.Group;
|
||||
using LightlessSync.PlayerData.Factories;
|
||||
using LightlessSync.PlayerData.Pairs;
|
||||
using LightlessSync.Services.Mediator;
|
||||
using LightlessSync.WebAPI;
|
||||
@@ -12,14 +13,16 @@ public class BanUserPopupHandler : IPopupHandler
|
||||
{
|
||||
private readonly ApiController _apiController;
|
||||
private readonly UiSharedService _uiSharedService;
|
||||
private readonly PairFactory _pairFactory;
|
||||
private string _banReason = string.Empty;
|
||||
private GroupFullInfoDto _group = null!;
|
||||
private Pair _reportedPair = null!;
|
||||
|
||||
public BanUserPopupHandler(ApiController apiController, UiSharedService uiSharedService)
|
||||
public BanUserPopupHandler(ApiController apiController, UiSharedService uiSharedService, PairFactory pairFactory)
|
||||
{
|
||||
_apiController = apiController;
|
||||
_uiSharedService = uiSharedService;
|
||||
_pairFactory = pairFactory;
|
||||
}
|
||||
|
||||
public Vector2 PopupSize => new(500, 250);
|
||||
@@ -43,7 +46,7 @@ public class BanUserPopupHandler : IPopupHandler
|
||||
|
||||
public void Open(OpenBanUserPopupMessage message)
|
||||
{
|
||||
_reportedPair = message.PairToBan;
|
||||
_reportedPair = _pairFactory.Create(message.PairToBan.UniqueIdent) ?? message.PairToBan;
|
||||
_group = message.GroupFullInfoDto;
|
||||
_banReason = string.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user