diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-08-17 12:26:32 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-08-17 12:26:32 +0300 |
commit | c0dcd7254a6704f6b1322e69b0a08a25c190078e (patch) | |
tree | e92c8c41ffccb54aa361b9c277011e9a13bfaa23 /ui/src/components/mail/view | |
parent | e5f871416232642f3490630caea76f283002d300 (diff) |
ui: bound check in draw_horz in ThreadView
Diffstat (limited to 'ui/src/components/mail/view')
-rw-r--r-- | ui/src/components/mail/view/thread.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/src/components/mail/view/thread.rs b/ui/src/components/mail/view/thread.rs index 57483825..a9b7e6f0 100644 --- a/ui/src/components/mail/view/thread.rs +++ b/ui/src/components/mail/view/thread.rs @@ -683,7 +683,11 @@ impl ThreadView { return; } - let mid = get_y(upper_left) + total_rows - bottom_entity_rows; + let mut mid = get_y(upper_left) + total_rows - bottom_entity_rows; + if mid >= get_y(bottom_right) { + mid = get_y(bottom_right) / 2; + } + let mid = mid; /* First draw the thread subject on the first row */ let y = { |