mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-05-11 18:10:10 +08:00
feat(picture): update Username property to return default value for null or empty usernames
This commit is contained in:
@@ -15,7 +15,12 @@ public record PictureResponse
|
||||
public DateTime? TakenAt { get; set; }
|
||||
public ExifInfo? ExifInfo { get; set; }
|
||||
public int? UserId { get; set; }
|
||||
public string? Username { get; set; }
|
||||
private string? _username;
|
||||
public string? Username
|
||||
{
|
||||
get => string.IsNullOrEmpty(_username) ? "匿名" : _username;
|
||||
set => _username = value;
|
||||
}
|
||||
public bool IsFavorited { get; set; }
|
||||
public int FavoriteCount { get; set; }
|
||||
public int? AlbumId { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user