nextcloud/apps/files_trashbin
Daniel Calviño Sánchez 449349e901 Fix opening a section again in the Files app
When a section is open in the Files app a "show" event is triggered.
File list objects handle that event by reloading themselves, but only
if the file list was shown at least once. However, the file list objects
of plugins are created when the "show" event is triggered for the first
time for their section; as the file list objects register their handler
for the "show" event when they are created they never handle the first
triggered "show" event, as the handler is set while that event is being
already handled. Therefore, from the point of view of the handler, the
second time that a "show" event was triggered it was seen as if the file
list was shown for the first time, and thus it was not reloaded. Now the
"shown" property is explicitly set for those file lists that are created
while handling a "show" event, which causes them to be reloaded as
expected when opening their section again.

Note that it is not possible to just reload the file list whenever it is
shown; the file list is reloaded also when the directory changes, and
this can happen when the web page is initially loaded and the URL is
parsed. In that case, if file lists were reloaded when shown for the
first time then it could be reloaded twice, one with the default
parameters due to the "show" event and another one with the proper
parameters once the URL was parsed, and the files that appeard in the
list would depend on which response from the server was received the
last.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-21 20:21:19 +02:00
..
appinfo remove old trashbin api 2018-09-20 17:03:38 +02:00
composer expose additional props from trashbin sabre endpoint 2018-09-20 17:03:26 +02:00
css Removed unneeded bgs and borders. Replaced hard coded colours by 2017-09-23 18:15:56 +02:00
img Svgo optimization 2016-09-27 20:56:26 +02:00
js Fix opening a section again in the Files app 2018-10-21 20:21:19 +02:00
l10n [tx-robot] updated from transifex 2018-10-07 00:12:21 +00:00
lib expose additional props from trashbin sabre endpoint 2018-09-20 17:03:26 +02:00
templates Added a new action menu in files and trash list. 2018-06-18 07:39:43 +02:00
tests Fix mock of ITimeFactory 2018-10-10 12:42:20 +02:00
list.php Fix apps/ 2016-07-21 18:13:57 +02:00