[PhotoFloat] [PATCH] Load image before album

Antoine Beaupré anarcat at orangeseeds.org
Thu Oct 17 15:44:50 CEST 2013


On 2013-10-17 07:46:37, Joachim Tingvold wrote:
> Hi,
>
> When opening links to a specific image, the album still loads first, so 
> you have to wait until the entire album is loaded before the image is 
> loaded. On small albums on fast connections, this doesn't cause 
> noticeable delay. However, having albums with a few hundred images or 
> more, or being on a slow connection, this is quite annoying.
>
> The fix was simple; load the image before the album (-:
>
> ############
> diff --git web/js/011-display.js web/js/011-display.js
> index f0ddd77..070b008 100644
> --- web/js/011-display.js
> +++ web/js/011-display.js
> @@ -257,9 +257,9 @@ $(document).ready(function() {
>                  currentPhoto = photo;
>                  currentPhotoIndex = photoIndex;
>                  setTitle();
> -               showAlbum(previousAlbum !== currentAlbum);
>                  if (photo !== null)
>                          showPhoto();
> +               showAlbum(previousAlbum !== currentAlbum);
>          }
>
>          /* Event listeners */
> ############

This makes sense!

You have this patch on github or something?

A.

-- 
Wherever they's a fight so hungry people can eat, I'll be there.
Wherever they's a cop beatin' up a guy, I'll be there.
If Casy knowed, why, I'll be in the way guys yell when they're mad an'
I'll be in the way kids laugh when they're hungry an' they know
supper's ready. An' when our folks eat the stuff they raise an' live
in the house they build, why I'll be there.
                        - John Steinbeck, The Grapes of Wrath
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/photofloat/attachments/20131017/13dbacc2/attachment.asc>


More information about the PhotoFloat mailing list