Skip to content
Snippets Groups Projects
Commit 5707c863 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Try to improve users load

parent bf7b6192
No related branches found
No related tags found
No related merge requests found
......@@ -228,8 +228,8 @@ Template.chatWindowDashboard.helpers
_id:
$in: room?.uids
unless Template.instance().showUsersOffline.get()
filter.status = { $ne: 'offline' }
# unless Template.instance().showUsersOffline.get()
filter.$and = [{ status: {$exists: true} }, { status: {$ne: 'offline'} }]
users = Meteor.users.find(filter, { sort: { name: 1 } } ).fetch()
ret.totalOnline = users.length
......@@ -469,6 +469,8 @@ Template.chatWindowDashboard.onCreated ->
this.scrollOnBottom = true
this.showUsersOffline = new ReactiveVar false
this.subscribe("allUsers")
Template.chatWindowDashboard.onRendered ->
FlexTab.check()
ChatMessages.init()
......
......@@ -107,6 +107,7 @@
<div class="content">
{{#if isGroupChat}}
<div class="list-view{{#if $.Session.get 'showUserInfo'}} -hidden{{/if}}">
{{#if Template.subscriptionsReady}}
{{#with roomUsers}}
<div class="status">
<h2>{{_ "chatWindowDashboard.Members_List"}}</h2>
......@@ -121,6 +122,7 @@
{{/each}}
</ul>
{{/with}}
{{/if}}
</div>
<div class="user-view animated{{#unless $.Session.get 'showUserInfo'}} -hidden{{/unless}}">
{{#with flexUserInfo}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment