Skip to content

Commit c2c0ada

Browse files
committed
cleaner solution
1 parent 5663f64 commit c2c0ada

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

BlueWP/Controls/Post/PostBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ public int VideoHeight
6262
{
6363
get
6464
{
65-
if (PostVideo == null)
65+
if (PostVideo?.aspectRatio == null)
6666
{
67-
return 100;
67+
return 200;
6868
}
69-
int height = PostVideo.aspectRatio == null ? 400 : (int)(ActualWidth * PostVideo.aspectRatio.height / PostVideo.aspectRatio.width);
69+
int height = (int)(ActualWidth * PostVideo.aspectRatio.height / PostVideo.aspectRatio.width);
7070
height = Math.Min(height, 400);
7171
return height;
7272
}

0 commit comments

Comments
 (0)