diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-15 08:10:40 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-20 14:18:15 +0300 |
commit | e96d9d19d9346854cad24dbc8993dae5f63f200b (patch) | |
tree | 103be67c32ea306197a9dec056c0413f0d8e6c97 /lib/PublicShareAuth | |
parent | a76f6d64d0f192cb8e42ae4c912ee461b3c60ba5 (diff) |
Use VirtualList for the message list in the chat view
The virtual list requires that its internal wrappers use an absolute
position. Due to that absolute position the padding of the container
does not affect the wrappers, so the desired padding must be applied
through its left and right position.
As the virtual list keeps only a subset of its elements in the DOM the
":first-child" pseudo-selector no longer refers to the actual first
child element, but to the first one currently in the DOM; it would be
necessary to apply the CSS rules using a specific CSS class set only in
the desired element. However, as the first comment always includes the
date separator, which already has a top margin, the top padding is not
really needed in the first comment, so it was simply removed.
Moving the message list between the main view and the sidebar changes
its size, and thus it is necessary to reload the virtual list; when the
virtual list is reloaded it is ensured that the last visible element
will still be visible after the reload, so the chat view no longer needs
to explicitly handle that.
In a similar way, the message list also needs to be reloaded when the
window is resized, or when the chat view is in the main view and the
sidebar is opened or closed, as those actions change the size of the
main view.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/PublicShareAuth')
-rw-r--r-- | lib/PublicShareAuth/TemplateLoader.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicShareAuth/TemplateLoader.php b/lib/PublicShareAuth/TemplateLoader.php index 8d187dcb6..52f4d0ddd 100644 --- a/lib/PublicShareAuth/TemplateLoader.php +++ b/lib/PublicShareAuth/TemplateLoader.php @@ -97,6 +97,7 @@ class TemplateLoader { Util::addScript('spreed', 'views/roomlistview'); Util::addScript('spreed', 'views/sidebarview'); Util::addScript('spreed', 'views/tabview'); + Util::addScript('spreed', 'views/virtuallist'); Util::addScript('spreed', 'richobjectstringparser'); Util::addScript('spreed', 'simplewebrtc'); Util::addScript('spreed', 'webrtc'); |