Expose method for drawable comment creation

This commit is contained in:
ansel
2023-01-18 18:10:35 +03:00
parent 18baf3dd5d
commit 0f2ca5d5ed

View File

@ -301,7 +301,7 @@ namespace osu.Game.Overlays.Comments
void addNewComment(Comment comment) void addNewComment(Comment comment)
{ {
var drawableComment = getDrawableComment(comment); var drawableComment = GetDrawableComment(comment);
if (comment.ParentId == null) if (comment.ParentId == null)
{ {
@ -333,7 +333,7 @@ namespace osu.Game.Overlays.Comments
if (CommentDictionary.ContainsKey(comment.Id)) if (CommentDictionary.ContainsKey(comment.Id))
continue; continue;
topLevelComments.Add(getDrawableComment(comment)); topLevelComments.Add(GetDrawableComment(comment));
} }
if (topLevelComments.Any()) if (topLevelComments.Any())
@ -351,7 +351,7 @@ namespace osu.Game.Overlays.Comments
} }
} }
private DrawableComment getDrawableComment(Comment comment) public DrawableComment GetDrawableComment(Comment comment)
{ {
if (CommentDictionary.TryGetValue(comment.Id, out var existing)) if (CommentDictionary.TryGetValue(comment.Id, out var existing))
return existing; return existing;