branch: elpa/helm
commit 16a319fb8d01c498e133d693ba782dd66da87118
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    Add a reporter for thumbnails
---
 helm-files.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index 866d6a2405..e4d6c81510 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -5115,7 +5115,10 @@ Special commands:
       (progn
         (cl-pushnew helm-ff-default-directory
                     helm-ff--thumbnailed-directories :test 'equal)
-        (cl-loop for (disp . img) in candidates
+        (cl-loop with reporter = (make-progress-reporter
+                                  "Loading thumbnails..." 0 (length 
candidates))
+                 for (disp . img) in candidates
+                 for count from 0
                  for imgtype = (helm-acase (file-name-extension img)
                                  ("png" 'png)
                                  (("jpg" "jpeg") 'jpeg))
@@ -5138,7 +5141,8 @@ Special commands:
                                                       rear-nonsticky 
'(display))
                                         disp)
                    (cons disp img))
-                   else collect (cons disp img)))
+                 else collect (cons disp img)
+                 when reporter do (progress-reporter-update reporter count)))
         candidates))
 
 ;; Same as `image-dired-get-thumbnail-image' but use

Reply via email to