summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-11-22 17:08:32 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2019-11-23 20:07:15 +0100
commit9fd279c020bba2f433a0f9862277bc59fd621130 (patch)
tree69f901b0b4f51eee918d4d7d1822325090cd9485 /src
parentWrap text in pre tags (diff)
downloadnheko-9fd279c020bba2f433a0f9862277bc59fd621130.tar.xz
Show encryption enabled and use a non zero size for zero size vide
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp5
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.;
 }
 }