fix nsfw and profile text box rendering
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>0.8.10</Version>
|
||||
<Version>0.8.11</Version>
|
||||
<Description></Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||
|
||||
@@ -61,7 +61,7 @@ public class MareProfileManager : MediatorSubscriberBase
|
||||
var profile = await _apiController.UserGetProfile(new API.Dto.User.UserDto(data)).ConfigureAwait(false);
|
||||
MareProfileData profileData = new(profile.Disabled, profile.IsNSFW ?? false, string.IsNullOrEmpty(profile.ProfilePictureBase64) ? _mareLogo : profile.ProfilePictureBase64,
|
||||
string.IsNullOrEmpty(profile.Description) ? _noDescription : profile.Description);
|
||||
if (profileData.IsNSFW && !_mareConfigService.Current.ProfilesAllowNsfw)
|
||||
if (profileData.IsNSFW && !_mareConfigService.Current.ProfilesAllowNsfw && _apiController.UID != data.UID)
|
||||
{
|
||||
_mareProfiles[data] = NsfwProfileData;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class EditProfileUi : WindowMediatorSubscriberBase
|
||||
Mediator.Subscribe<DisconnectedMessage>(this, (_) => IsOpen = false);
|
||||
Mediator.Subscribe<ClearProfileDataMessage>(this, (msg) =>
|
||||
{
|
||||
if (msg.UserData != null || string.Equals(msg.UserData.UID, _apiController.UID, StringComparison.Ordinal))
|
||||
if (msg.UserData == null || string.Equals(msg.UserData.UID, _apiController.UID, StringComparison.Ordinal))
|
||||
{
|
||||
_pfpTextureWrap?.Dispose();
|
||||
_pfpTextureWrap = null;
|
||||
@@ -89,10 +89,10 @@ public class EditProfileUi : WindowMediatorSubscriberBase
|
||||
ImGui.Image(_pfpTextureWrap.ImGuiHandle, new System.Numerics.Vector2(_pfpTextureWrap.Width, _pfpTextureWrap.Height));
|
||||
}
|
||||
|
||||
ImGui.SameLine(256);
|
||||
var posX = ImGui.GetCursorPosX();
|
||||
var spacing = ImGui.GetStyle().ItemSpacing.X;
|
||||
var width = UiSharedService.GetWindowContentRegionWidth() - posX + spacing;
|
||||
ImGui.SameLine(256 + spacing * 2);
|
||||
var posX = ImGui.GetCursorPosX();
|
||||
var width = UiSharedService.GetWindowContentRegionWidth() - posX + spacing * 2;
|
||||
if (ImGui.BeginChildFrame(100, new System.Numerics.Vector2(width, 256)))
|
||||
{
|
||||
var nsfw = profile.IsNSFW;
|
||||
|
||||
Reference in New Issue
Block a user