Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some offline users have a visible empty <dd> in the roster #372

Closed
floriancargoet opened this issue Apr 17, 2015 · 4 comments
Closed

Some offline users have a visible empty <dd> in the roster #372

floriancargoet opened this issue Apr 17, 2015 · 4 comments

Comments

@floriancargoet
Copy link
Contributor

With hide_offline_users: true, there's a display bug: some <dd> are empty but not hidden.

See screenshots :
offline_bug
offline_bug2

Collapsing and expanding a group "solves" the display bug because of filtering.

@floriancargoet
Copy link
Contributor Author

I think the bug was identified, I found this :

 show: function () {
  // FIXME: There's a bug here, if show_only_online_users is true
  // Possible solution, get the group, call _.each and check
  // showInRoster
  this.$el.nextUntil('dt').addBack().show();
},

@floriancargoet
Copy link
Contributor Author

An easy solution would be to filter the nextUntil and only select online contacts:

this.$el.nextUntil('dt', '.online').addBack().show();

But the online class is still there after a contact has gone offline, so maybe that needs fixing too.

@floriancargoet
Copy link
Contributor Author

I've realised that it's not exactly the same bug. The comment is about the show_only_online_users option, not hide_offline_users.

@floriancargoet
Copy link
Contributor Author

OK, I think I've worked out something :

            show: function () {
                this.$el.show();
                _.each(this.getAll(), function (contactView) {
                    if (contactView.model.showInRoster()) {
                        contactView.$el.show();
                    }
                });
            },

PR coming.

floriancargoet added a commit to Spicesoft/tandoori-chat that referenced this issue Apr 20, 2015
jcbrand added a commit that referenced this issue Apr 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant