diff options
author | mousebot <mousebot@riseup.net> | 2021-10-18 20:54:03 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-10-18 20:54:03 +0200 |
commit | 7bcf78751c7e0f8ac6d5ad03be8e87e8ed30f9a3 (patch) | |
tree | c14c980b7ef55f58bcc492f30f6aa9424b70230d | |
parent | f0dbd664537bab060f2b4d8b7f1d6e439f6a2530 (diff) |
Revert "handle cached images"
-- caching images with url.el locks up mastodon.el
This reverts commit 0129bcf466a4913bdda095b977cd06560c406a30.
-rw-r--r-- | lisp/mastodon-media.el | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index 8ef9c44..b58eab6 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -189,15 +189,9 @@ REGION-LENGTH is the range from start to propertize." (condition-case nil ;; catch any errors in url-retrieve so as to not abort ;; whatever called us - (if (url-is-cached url) - (with-current-buffer (url-fetch-from-cache url) - (set-buffer-multibyte nil) - (goto-char (point-min)) - (zlib-decompress-region (goto-char (search-forward "\n\n")) (point-max)) - (mastodon-media--process-image-response nil marker image-options region-length)) - (url-retrieve url - #'mastodon-media--process-image-response - (list marker image-options region-length))) + (url-retrieve url + #'mastodon-media--process-image-response + (list marker image-options region-length)) (error (with-current-buffer buffer ;; TODO: Consider adding retries (put-text-property marker @@ -205,7 +199,7 @@ REGION-LENGTH is the range from start to propertize." 'media-state 'loading-failed) :loading-failed)))))) -H + (defun mastodon-media--select-next-media-line (end-pos) "Find coordinates of the next media to load before END-POS. |