Fixed some stuff
This commit is contained in:
@@ -49,7 +49,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
private Task<int>? _pruneTestTask;
|
||||
private Task<int>? _pruneTask;
|
||||
private int _pruneDays = 14;
|
||||
private readonly List<string> _allowedTags = ["Apex", "Predator", "Tavern", "NSFW", "SFW"];
|
||||
private readonly List<string> _allowedTags = ["SFW", "NSFW", "RP", "ERP", "Venues", "Gpose"];
|
||||
private List<string> _selectedTags = [];
|
||||
|
||||
public SyncshellAdminUI(ILogger<SyncshellAdminUI> logger, LightlessMediator mediator, ApiController apiController,
|
||||
@@ -372,7 +372,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
UiSharedService.AttachToolTip("Clears your profile description text");
|
||||
ImGui.Separator();
|
||||
ImGui.TextUnformatted($"Profile Options:");
|
||||
var isNsfw = _profileData.;
|
||||
var isNsfw = _profileData.IsNsfw;
|
||||
if (ImGui.Checkbox("Profile is NSFW", ref isNsfw))
|
||||
{
|
||||
_ = _apiController.GroupSetProfile(new GroupProfileDto(new GroupData(GroupFullInfo.Group.AliasOrGID), Description: null, Tags: null, PictureBase64: null, IsNsfw: isNsfw, IsDisabled: null));
|
||||
@@ -734,24 +734,19 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
|
||||
{
|
||||
if (HasTag)
|
||||
{
|
||||
_ = _apiController.GroupSetProfile(new GroupProfileDto(new GroupData(GroupFullInfo.Group.AliasOrGID), Description: null, Tags: ListToString(_selectedTags, ","), PictureBase64: null, IsNsfw: null, IsDisabled: null));
|
||||
|
||||
_selectedTags.Add(tag);
|
||||
_ = _apiController.GroupSetProfile(new GroupProfileDto(new GroupData(GroupFullInfo.Group.AliasOrGID), Description: null, Tags: ListToString(_selectedTags, ","), PictureBase64: null, IsNsfw: null, IsDisabled: null));
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = _selectedTags.Count > 0
|
||||
? _apiController.GroupSetProfile(new GroupProfileDto(new GroupData(GroupFullInfo.Group.AliasOrGID), Description: null, Tags: ListToString(_selectedTags, ","), PictureBase64: null, IsNsfw: null, IsDisabled: null))
|
||||
: _apiController.GroupSetProfile(new GroupProfileDto(new GroupData(GroupFullInfo.Group.AliasOrGID), Description: null, Tags: string.Empty, PictureBase64: null, IsNsfw: null, IsDisabled: null));
|
||||
|
||||
_selectedTags.Remove(tag);
|
||||
_ = _apiController.GroupSetProfile(new GroupProfileDto(new GroupData(GroupFullInfo.Group.AliasOrGID), Description: null, Tags: ListToString(_selectedTags, ","), PictureBase64: null, IsNsfw: null, IsDisabled: null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void GetTagsFromProfile()
|
||||
{
|
||||
_selectedTags = [];
|
||||
if (_profileData != null)
|
||||
{
|
||||
_selectedTags = StringToList(_profileData.Tags, ",");
|
||||
|
||||
Reference in New Issue
Block a user