diff --git a/packages/rocketchat-ui-sidenav/client/chatRoomItem.html b/packages/rocketchat-ui-sidenav/client/chatRoomItem.html deleted file mode 100644 index 2716db47769..00000000000 --- a/packages/rocketchat-ui-sidenav/client/chatRoomItem.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/packages/rocketchat-ui-sidenav/client/chatRoomItem.js b/packages/rocketchat-ui-sidenav/client/chatRoomItem.js deleted file mode 100644 index d380043a1c9..00000000000 --- a/packages/rocketchat-ui-sidenav/client/chatRoomItem.js +++ /dev/null @@ -1,75 +0,0 @@ -/* globals KonchatNotification */ - -Template.chatRoomItem.helpers({ - data() { - let name = this.name; - if (RocketChat.settings.get('UI_Use_Real_Name') && this.fname) { - name = this.fname; - } - - let unread = false; - if (((FlowRouter.getParam('_id') !== this.rid) || !document.hasFocus()) && (this.unread > 0)) { - unread = this.unread; - } - - let active = false; - if (Session.get('openedRoom') && Session.get('openedRoom') === this.rid || Session.get('openedRoom') === this._id) { - active = true; - } - - const archivedClass = this.archived ? 'archived' : false; - - let alertClass = false; - if (!this.hideUnreadStatus && (FlowRouter.getParam('_id') !== this.rid || !document.hasFocus()) && this.alert) { - alertClass = 'sidebar-content-unread'; - } - - let statusClass = false; - - if (this.t === 'd') { - switch (RocketChat.roomTypes.getUserStatus(this.t, this.rid)) { - case 'online': - statusClass = 'general-success-background'; - break; - case 'away': - statusClass = 'general-pending-background'; - break; - case 'busy': - statusClass = 'general-error-background'; - break; - case 'offline': - statusClass = 'general-inactive-background'; - break; - default: - statusClass = 'general-inactive-background'; - } - } - return { - ...this, - name, - unread, - active, - archivedClass, - alertClass, - statusClass - }; - }, - - canLeave() { - const roomData = Session.get(`roomData${ this.rid }`); - - if (!roomData) { return false; } - - if (((roomData.cl != null) && !roomData.cl) || (roomData.t === 'd')) { - return false; - } else { - return true; - } - } -}); - -Template.chatRoomItem.onRendered = function() { - if (!(FlowRouter.getParam('_id') && (FlowRouter.getParam('_id') === this.data.rid)) && !this.data.ls && (this.data.alert === true)) { - return KonchatNotification.newRoom(this.data.rid); - } -}; diff --git a/packages/rocketchat-ui-sidenav/client/roomList.html b/packages/rocketchat-ui-sidenav/client/roomList.html index cdd374d6980..eca7896deee 100644 --- a/packages/rocketchat-ui-sidenav/client/roomList.html +++ b/packages/rocketchat-ui-sidenav/client/roomList.html @@ -14,7 +14,7 @@