From 8f77c2e00bce18ea1544912bff2525c051968aec Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Tue, 4 Feb 2020 23:09:03 -0800 Subject: [PATCH] expose isRss, don't close uncloseable Rss conversation on deleteMessages --- js/models/conversations.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 52290e7a9..29c9ab317 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -561,6 +561,7 @@ type: this.isPrivate() ? 'direct' : 'group', isMe: this.isMe(), isPublic: this.isPublic(), + isRss: this.isRss(), isClosable: this.isClosable(), isTyping: typingKeys.length > 0, lastUpdated: this.get('timestamp'), @@ -2798,11 +2799,19 @@ this.messageCollection.reset([]); - this.set({ - lastMessage: null, - timestamp: null, - active_at: null, - }); + // let's try to keep the RSS conversation open just empty... + if (this.isRss()) { + this.set({ + lastMessage: null, + }); + } else { + // this will remove the conversation from conversation lists... + this.set({ + lastMessage: null, + timestamp: null, + active_at: null, + }); + } // Reset our friend status if we're not friends if (!this.isFriend()) {