unexpanded images still being retried should be shown as expanding
This commit is contained in:
parent
d25a0cecfd
commit
09dee74ca5
@ -184,6 +184,7 @@ Gallery =
|
||||
if file.error?.code is MediaError.MEDIA_ERR_DECODE
|
||||
return new Notice 'error', 'Corrupt or unplayable video', 30
|
||||
ImageCommon.error g.posts[file.dataset.post], null, ->
|
||||
return unless URL
|
||||
thumb.href = URL
|
||||
file.src = URL if Gallery.nodes.current is file
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ ImageCommon =
|
||||
filename: post.file.URL
|
||||
if URL and (/^https:\/\//.test(URL) or location.protocol is 'http:')
|
||||
return cb URL
|
||||
cb null # report nothing to retry
|
||||
|
||||
addControls: (video) ->
|
||||
handler = ->
|
||||
|
||||
@ -218,15 +218,18 @@ ImageExpand =
|
||||
post = Get.postFromNode @
|
||||
$.rm @
|
||||
delete post.file.fullImage
|
||||
if ImageCommon.decodeError @, post
|
||||
ImageExpand.contract post
|
||||
return
|
||||
# Images can error:
|
||||
# - before the image started loading.
|
||||
# - after the image started loading.
|
||||
unless post.file.isExpanding or post.file.isExpanded
|
||||
# Don't try to re-expand if it was already contracted.
|
||||
return
|
||||
ImageExpand.contract post
|
||||
return if ImageCommon.decodeError @, post
|
||||
ImageCommon.error post, 10 * $.SECOND, (URL) -> ImageExpand.expand post, URL
|
||||
# Don't try to re-expand if it was already contracted.
|
||||
if post.file.isExpanding or post.file.isExpanded
|
||||
ImageCommon.error post, 10 * $.SECOND, (URL) ->
|
||||
if post.file.isExpanding or post.file.isExpanded
|
||||
ImageExpand.contract post
|
||||
ImageExpand.expand post, URL if URL
|
||||
|
||||
menu:
|
||||
init: ->
|
||||
|
||||
@ -44,4 +44,5 @@ ImageHover =
|
||||
return unless doc.contains @
|
||||
post = g.posts[@dataset.fullID]
|
||||
return if ImageCommon.decodeError @, post
|
||||
ImageCommon.error post, 3 * $.SECOND, @src = URL
|
||||
ImageCommon.error post, 3 * $.SECOND, ->
|
||||
@src = URL if URL
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user