From 663654ef2c4fd11aeca4bf2e5ac7fd29a6000d1c Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 18 Sep 2020 10:43:58 +1000 Subject: [PATCH] remove getInitials from conversation - unused --- js/models/conversations.js | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 87843e33f..096806d37 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -2504,21 +2504,6 @@ return this.id; }, - getInitials(name) { - if (!name) { - return null; - } - - const cleaned = name.replace(/[^A-Za-z\s]+/g, '').replace(/\s+/g, ' '); - const parts = cleaned.split(' '); - const initials = parts.map(part => part.trim()[0]); - if (!initials.length) { - return null; - } - - return initials.slice(0, 2).join(''); - }, - isPrivate() { return this.get('type') === 'private'; }, @@ -2537,18 +2522,9 @@ return null; }, getAvatar() { - const title = this.get('name'); const url = this.getAvatarPath(); - if (url) { - return { url }; - } else if (this.isPrivate()) { - const symbol = this.isValid() ? '#' : '!'; - return { - content: this.getInitials(title) || symbol, - }; - } - return { url: null }; + return url ? { url } : { url: null }; }, getNotificationIcon() {