From 2d097c10d008780c56798c444ae4d18414310bdb Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 12 Dec 2018 18:06:00 +0100 Subject: [PATCH] [Glitch] Make account media gallery more consistent with account timeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Display “load more” more consistently, add a loading indicator on first load. --- .../glitch/features/account_gallery/index.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.js b/app/javascript/flavours/glitch/features/account_gallery/index.js index 0405af2c33c..a77db1c1b85 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/index.js +++ b/app/javascript/flavours/glitch/features/account_gallery/index.js @@ -107,8 +107,8 @@ export default class AccountGallery extends ImmutablePureComponent { ); } - if (!isLoading && medias.size > 0 && hasMore) { - loadOlder = ; + if (hasMore) { + loadOlder = ; } return ( @@ -116,10 +116,10 @@ export default class AccountGallery extends ImmutablePureComponent { -
+
-
+
{medias.map((media, index) => media === null ? ( + + {isLoading && medias.size === 0 && ( +
+ +
+ )}