FIX: Loading more broken on groups page.

FIX: Loading more broken on groups page.

Regressed in 1f17d52f552d01cb5ea628294d1b25666631fa87.

diff --git a/app/assets/javascripts/discourse/templates/groups/index.hbs b/app/assets/javascripts/discourse/templates/groups/index.hbs
index e19bcbb..955af19 100644
--- a/app/assets/javascripts/discourse/templates/groups/index.hbs
+++ b/app/assets/javascripts/discourse/templates/groups/index.hbs
@@ -23,11 +23,11 @@
 
   {{#if model}}
     {{#conditional-loading-spinner condition=model.loading}}
-      {{#load-more selector=".groups-table .groups-table-row" action=(action "loadMore")}}
+      {{#load-more selector=".groups-boxes .group-box" action=(action "loadMore")}}
         <div class='container'>
           <div class="groups-boxes">
             {{#each model as |group|}}
-            {{#link-to "group.members" group.name class="group-box"}}
+              {{#link-to "group.members" group.name class="group-box"}}
                 <div class="group-box-inner">
                   <div class="group-info-wrapper">
                     {{#if group.flair_url}}
@@ -39,13 +39,13 @@
                           groupName=group.name}}
                       </span>
                     {{/if}}
-                    <span class="group-info">
-                    {{groups-info group=group}}
 
-                    <div class="group-user-count">{{d-icon "user"}}{{group.user_count}}</div>
-                  </span>
-                </div>
+                    <span class="group-info">
+                      {{groups-info group=group}}
 
+                      <div class="group-user-count">{{d-icon "user"}}{{group.user_count}}</div>
+                    </span>
+                  </div>
 
                   <div class="group-description">{{{group.bio_excerpt}}}</div>
 
@@ -77,7 +77,7 @@
                     {{/group-membership-button}}
                   </div>
                 </div>
-                {{/link-to}}
+              {{/link-to}}
             {{/each}}
           </div>
         </div>
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 9fc82d1..0fb1694 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -1,4 +1,6 @@
 class GroupsController < ApplicationController
+  include ApplicationHelper
+
   requires_login only: [
     :set_notifications,
     :mentionable,
@@ -42,7 +44,7 @@ class GroupsController < ApplicationController
       raise Discourse::InvalidAccess.new(:enable_group_directory)
     end
 
-    page_size = 30
+    page_size = mobile_device? ? 15 : 36
     page = params[:page]&.to_i || 0
     order = %w{name user_count}.delete(params[:order])
     dir = params[:asc] ? 'ASC' : 'DESC'

GitHub sha: dca7f8ec

2 Likes

This commit has been mentioned on Discourse Meta. There might be relevant details there: