diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-11-22 17:08:32 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2019-11-23 20:07:15 +0100 |
commit | 9fd279c020bba2f433a0f9862277bc59fd621130 (patch) | |
tree | 69f901b0b4f51eee918d4d7d1822325090cd9485 /src/timeline/TimelineModel.cpp | |
parent | Wrap text in pre tags (diff) | |
download | nheko-9fd279c020bba2f433a0f9862277bc59fd621130.tar.xz |
Show encryption enabled and use a non zero size for zero size vide
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 11344e60..b904dfd7 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -320,7 +320,10 @@ eventPropHeight(const mtx::events::RoomEvent<T> &e) auto w = eventWidth(e); if (w == 0) w = 1; - return eventHeight(e) / (double)w; + + double prop = eventHeight(e) / (double)w; + + return prop > 0 ? prop : 1.; } } |