Commit graph

21 commits

Author SHA1 Message Date
Luke Barnard
836dc8b0ef Factor out all shared logic between MStickerBody and MImageBody
The benefits of this:
 - One code path for determining spinner/placeholder and it's position
   for loading images/stickers. This includes spinner used in e2e
   decryption of images.
 - Very small definition for MStickerBody, only overriding the minimal
   differences is has from MImageBody.

The disadvantages:
 - Slightly more complicated MImageBody, but hopefully not less
   readable.
2018-05-21 16:59:13 +01:00
Luke Barnard
b41b9aa4fa Remove fixupHeight call from MStickerBody 2018-05-18 09:58:52 +01:00
David Baker
b6e317647a Fix stickers briefly being 2x the size
fixupHeight was the only thing actually fixing the size of the
sticker image to be the size we want it rather than the pixel size
of the image, and this was only getting run after the image loaded,
causing a flash of 2x image.
2018-05-14 13:41:41 +01:00
Matthew Hodgson
afb9e1f5f4 blind fix to the overlapping sticker bug 2018-05-08 09:50:06 +01:00
Richard Lewis
2e6d6c83cd Add back in body 'ref' 2018-03-29 21:16:12 +01:00
Richard Lewis
9c10d243e8 Add comment. 2018-03-29 17:09:03 +01:00
Richard Lewis
f383298267 Remove duplicate event handler. 2018-03-29 17:08:07 +01:00
Richard Lewis
cafbd2904e Remove unused ref. 2018-03-29 16:57:21 +01:00
Richard Lewis
83412acbe7 Display sticker content (URL), rather than thumbnail. 2018-03-14 11:11:21 +00:00
Richard Lewis
7e062090de Cleanup timeout before unmount. 2018-03-09 21:12:56 +00:00
Richard Lewis
e7c19fd83b Don't render placeholder when image is visible. 2018-03-08 23:12:12 +00:00
Richard Lewis
3ab8b1f866 Hide sticker picker delete button and show minimise button. 2018-03-08 17:20:42 +00:00
Richard Lewis
c59dd5b840 Add placeholders for sticker images (and fancy transitions). 2018-03-08 12:31:01 +00:00
Richard Lewis
7755a3ce90 Nest sticker image element for correct positioning of tooltips. 2018-03-06 10:48:32 +00:00
Richard Lewis
f3c928a4fc Lint. 2018-02-28 13:43:19 +00:00
Richard Lewis
0fdbddf8fd Show sticker description as a tooltip, on hover. 2018-02-27 23:07:59 +00:00
Richard Lewis
5ca0fc3ab5 Make MStickerBody extend MImageBody. 2018-02-26 14:01:33 +00:00
Richard Lewis
57247493d9 Remove unused deps. 2018-01-04 22:59:50 +00:00
Richard Lewis
d256e473eb Fix header and remove unused deps. 2018-01-04 22:51:49 +00:00
Richard Lewis
d652f117fb Remove click handlers etc. 2018-01-04 22:36:29 +00:00
Richard Lewis
1c8586e802 Add sticker message rendering. 2018-01-04 22:21:38 +00:00