Show encryption enabled and use a non zero size for zero size vide

This commit is contained in:
Nicolas Werner 2019-11-22 17:08:32 +01:00
parent 85aae9408b
commit 9fd279c020
6 changed files with 16 additions and 6 deletions

View file

@ -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.;
}
}