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

Limit unread message counter to "99+" #845

Merged
merged 1 commit into from
May 3, 2018

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented May 3, 2018

CSS is a copy of the server version now

Top is new (84445 is now 99+)
Bottom is old (number is cut off)

bildschirmfoto von 2018-05-03 11-18-59

As per documentation https://docs.nextcloud.com/server/13/developer_manual/design/navigation.html#counter the counter should be limited to 3 digits, but I think for chat messages it does not matter anymore when it's over 100, so we display 99+ when it's more then 99

@Ivansss @mario we limit the number in the UI not the api, so maybe you can limit it too to 99+

Signed-off-by: Joas Schilling <coding@schilljs.com>
@@ -103,7 +103,8 @@
templateContext: function() {
return {
isDeletable: (this.model.get('participantType') === 1 || this.model.get('participantType') === 2) &&
(Object.keys(this.model.get('participants')).length > 1 || this.model.get('numGuests') > 0)
(Object.keys(this.model.get('participants')).length > 1 || this.model.get('numGuests') > 0),
numUnreadMessages: this.model.get('unreadMessages') > 99 ? '99+' : this.model.get('unreadMessages')
Copy link
Member

@danxuliu danxuliu May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the 99+ should be internationalized, as a different string could be needed (although I am not really sure) in languages that do not use Hindu-Arabic numerals or the plus sign.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quickly thought about it too, but I wouldn't know which language does not use + for +? :D
lets keep it until someone complains.

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@Ivansss Ivansss merged commit e59a669 into master May 3, 2018
@Ivansss Ivansss deleted the feature/noid/limit-unread-counter-to-99plus branch May 3, 2018 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants