mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-22 17:22:22 -05:00
Make unread count default to '' instead of 0
This commit is contained in:
parent
e6a6446349
commit
109a3477d1
File diff suppressed because one or more lines are too long
@ -53,6 +53,15 @@ module.exports = HumanModel.define({
|
|||||||
return this.name || this.jid;
|
return this.name || this.jid;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
displayUnreadCount: {
|
||||||
|
deps: ['unreadCount'],
|
||||||
|
fn: function () {
|
||||||
|
if (this.unreadCount > 0) {
|
||||||
|
return this.unreadCount.toString();
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
formattedTZO: {
|
formattedTZO: {
|
||||||
deps: ['timezoneOffset', 'displayName'],
|
deps: ['timezoneOffset', 'displayName'],
|
||||||
fn: function () {
|
fn: function () {
|
||||||
|
@ -45,7 +45,6 @@ module.exports = HumanModel.define({
|
|||||||
deps: ['created'],
|
deps: ['created'],
|
||||||
fn: function () {
|
fn: function () {
|
||||||
if (this.created) {
|
if (this.created) {
|
||||||
console.log(this.created);
|
|
||||||
var month = this.created.getMonth();
|
var month = this.created.getMonth();
|
||||||
var day = this.created.getDate();
|
var day = this.created.getDate();
|
||||||
var hour = this.created.getHours();
|
var hour = this.created.getHours();
|
||||||
|
@ -18,7 +18,7 @@ module.exports = HumanView.extend({
|
|||||||
textBindings: {
|
textBindings: {
|
||||||
displayName: '.name',
|
displayName: '.name',
|
||||||
status: '.status',
|
status: '.status',
|
||||||
unreadCount: '.unread'
|
displayUnreadCount: '.unread'
|
||||||
},
|
},
|
||||||
srcBindings: {
|
srcBindings: {
|
||||||
avatar: '.avatar'
|
avatar: '.avatar'
|
||||||
|
Loading…
Reference in New Issue
Block a user