watafak
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Dalamud.Interface.ImGuiFileDialog;
|
||||
using LightlessSync.API.Data;
|
||||
using LightlessSync.API.Dto.Group;
|
||||
using LightlessSync.PlayerData.Pairs;
|
||||
@@ -23,6 +22,7 @@ public class UiFactory
|
||||
private readonly LightlessProfileManager _lightlessProfileManager;
|
||||
private readonly PerformanceCollectorService _performanceCollectorService;
|
||||
private readonly ProfileTagService _profileTagService;
|
||||
private readonly DalamudUtilService _dalamudUtilService;
|
||||
|
||||
public UiFactory(
|
||||
ILoggerFactory loggerFactory,
|
||||
@@ -33,7 +33,8 @@ public class UiFactory
|
||||
ServerConfigurationManager serverConfigManager,
|
||||
LightlessProfileManager lightlessProfileManager,
|
||||
PerformanceCollectorService performanceCollectorService,
|
||||
ProfileTagService profileTagService)
|
||||
ProfileTagService profileTagService,
|
||||
DalamudUtilService dalamudUtilService)
|
||||
{
|
||||
_loggerFactory = loggerFactory;
|
||||
_lightlessMediator = lightlessMediator;
|
||||
@@ -44,6 +45,7 @@ public class UiFactory
|
||||
_lightlessProfileManager = lightlessProfileManager;
|
||||
_performanceCollectorService = performanceCollectorService;
|
||||
_profileTagService = profileTagService;
|
||||
_dalamudUtilService = dalamudUtilService;
|
||||
}
|
||||
|
||||
public SyncshellAdminUI CreateSyncshellAdminUi(GroupFullInfoDto dto)
|
||||
@@ -60,76 +62,16 @@ public class UiFactory
|
||||
}
|
||||
|
||||
public StandaloneProfileUi CreateStandaloneProfileUi(Pair pair)
|
||||
{
|
||||
return new StandaloneProfileUi(
|
||||
_loggerFactory.CreateLogger<StandaloneProfileUi>(),
|
||||
_lightlessMediator,
|
||||
_uiSharedService,
|
||||
_serverConfigManager,
|
||||
_profileTagService,
|
||||
_lightlessProfileManager,
|
||||
_pairUiService,
|
||||
pair,
|
||||
pair.UserData,
|
||||
null,
|
||||
false,
|
||||
null,
|
||||
_performanceCollectorService);
|
||||
}
|
||||
=> CreateStandaloneProfileUiInternal(pair, pair.UserData, null, false, null);
|
||||
|
||||
public StandaloneProfileUi CreateStandaloneProfileUi(UserData userData)
|
||||
{
|
||||
return new StandaloneProfileUi(
|
||||
_loggerFactory.CreateLogger<StandaloneProfileUi>(),
|
||||
_lightlessMediator,
|
||||
_uiSharedService,
|
||||
_serverConfigManager,
|
||||
_profileTagService,
|
||||
_lightlessProfileManager,
|
||||
_pairUiService,
|
||||
null,
|
||||
userData,
|
||||
null,
|
||||
false,
|
||||
null,
|
||||
_performanceCollectorService);
|
||||
}
|
||||
=> CreateStandaloneProfileUiInternal(null, userData, null, false, null);
|
||||
|
||||
public StandaloneProfileUi CreateLightfinderProfileUi(UserData userData, string hashedCid)
|
||||
{
|
||||
return new StandaloneProfileUi(
|
||||
_loggerFactory.CreateLogger<StandaloneProfileUi>(),
|
||||
_lightlessMediator,
|
||||
_uiSharedService,
|
||||
_serverConfigManager,
|
||||
_profileTagService,
|
||||
_lightlessProfileManager,
|
||||
_pairUiService,
|
||||
null,
|
||||
userData,
|
||||
null,
|
||||
true,
|
||||
hashedCid,
|
||||
_performanceCollectorService);
|
||||
}
|
||||
=> CreateStandaloneProfileUiInternal(null, userData, null, true, hashedCid);
|
||||
|
||||
public StandaloneProfileUi CreateStandaloneGroupProfileUi(GroupData groupInfo)
|
||||
{
|
||||
return new StandaloneProfileUi(
|
||||
_loggerFactory.CreateLogger<StandaloneProfileUi>(),
|
||||
_lightlessMediator,
|
||||
_uiSharedService,
|
||||
_serverConfigManager,
|
||||
_profileTagService,
|
||||
_lightlessProfileManager,
|
||||
_pairUiService,
|
||||
null,
|
||||
null,
|
||||
groupInfo,
|
||||
false,
|
||||
null,
|
||||
_performanceCollectorService);
|
||||
}
|
||||
=> CreateStandaloneProfileUiInternal(null, null, groupInfo, false, null);
|
||||
|
||||
public PermissionWindowUI CreatePermissionPopupUi(Pair pair)
|
||||
{
|
||||
@@ -141,4 +83,28 @@ public class UiFactory
|
||||
_apiController,
|
||||
_performanceCollectorService);
|
||||
}
|
||||
|
||||
private StandaloneProfileUi CreateStandaloneProfileUiInternal(
|
||||
Pair? pair,
|
||||
UserData? userData,
|
||||
GroupData? groupData,
|
||||
bool isLightfinderContext,
|
||||
string? lightfinderCid)
|
||||
{
|
||||
return new StandaloneProfileUi(
|
||||
_loggerFactory.CreateLogger<StandaloneProfileUi>(),
|
||||
_lightlessMediator,
|
||||
_uiSharedService,
|
||||
_serverConfigManager,
|
||||
_profileTagService,
|
||||
dalamudUtilService: _dalamudUtilService,
|
||||
lightlessProfileManager: _lightlessProfileManager,
|
||||
pairUiService: _pairUiService,
|
||||
pair: pair,
|
||||
userData: userData,
|
||||
groupData: groupData,
|
||||
isLightfinderContext: isLightfinderContext,
|
||||
lightfinderCid: lightfinderCid,
|
||||
performanceCollector: _performanceCollectorService);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user