Skip to content

Commit

Permalink
cleaner solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargaj committed Dec 26, 2024
1 parent 5663f64 commit c2c0ada
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BlueWP/Controls/Post/PostBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public int VideoHeight
{
get
{
if (PostVideo == null)
if (PostVideo?.aspectRatio == null)
{
return 100;
return 200;
}
int height = PostVideo.aspectRatio == null ? 400 : (int)(ActualWidth * PostVideo.aspectRatio.height / PostVideo.aspectRatio.width);
int height = (int)(ActualWidth * PostVideo.aspectRatio.height / PostVideo.aspectRatio.width);
height = Math.Min(height, 400);
return height;
}
Expand Down

0 comments on commit c2c0ada

Please sign in to comment.