-
Notifications
You must be signed in to change notification settings - Fork 56
Hide icon-loading-dark after loading the image #165
Conversation
|
For me this only works when viewing the image for the first time.
Can you reproduce this behaviour?
|
Current coverage is 99.75% (diff: 100%)@@ master #165 diff @@
==========================================
Files 39 39
Lines 1201 1201
Methods 170 170
Messages 0 0
Branches 0 0
==========================================
Hits 1198 1198
Misses 3 3
Partials 0 0
|
e01e4fd to
b0efcfa
Compare
|
It took me a long time to understand why you placed the two commands at those positions. |
|
@jaller94 For the first command what it does is it simply hides the loading icon after successfully loading the image. and the second command show the icon back if the image is still loading and then it is again hidden after loading the image using first command. |
|
I reviewed it and tested it on my personal Nextcloud instance. I approve of your Pull Request. @manishbisht Hope you can convince the auto checks and someone in the project. |
jaller94
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two additions in the code are perfectly suitable to fix the referenced issue.
js/slideshow.js
Outdated
| * @param {Object} next | ||
| */ | ||
| next: function (current, next) { | ||
| this.container.find('.icon-loading-dark').show(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could move this before line 99.
I think it then looks more natural to call show() and then call hide() on resolution of the promise a couple of lines "later".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, show spinner, hide image, load image, hide spinner.
357162e to
17ed0e2
Compare
|
I have moved the code after the mentioned line @oparoz @oliverpool |
|
@manishbisht it appears that you need to sign off your commit |
|
Earlier this was not required. Good to see this feature here !! |
From what I understand, you need to amend your commit with the |
Signed-off-by: Manish Bisht <manish.bisht490@gmail.com>
17ed0e2 to
45fa4b0
Compare
|
@oliverpool I have signoff my commit |
Fixes: #160
Licence: MIT or AGPL
Description
Hide icon-loading-dark after loading the image and displaying it back when the image is loading.
Tested on
Reviewers
@oparoz