From 1ae45bdaa167b3696ebe5100a76d9359d0cb80a8 Mon Sep 17 00:00:00 2001
From: Jonathan Matthews <54287723+jmattt@users.noreply.github.com>
Date: Mon, 19 Aug 2019 15:18:05 -0400
Subject: [PATCH] Fix grid view

Signed-off-by: Jonathan Matthews <jgit@pixelnet.work>
---
 apps/files/js/filelist.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 7a6665b0807..dc875d40c12 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -672,6 +672,11 @@
 				.addClass(show ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
 				
 			$('.list-container').toggleClass('view-grid', show);
+			if (show) {
+				// If switching into grid view from list view, too few files might be displayed
+				// Try rendering the next page
+				this._onScroll();
+			}
 		},
 
 		/**
-- 
GitLab