Eliminate some conversation fields which are no longer used
This commit is contained in:
parent
e08c5e3307
commit
0297279084
2 changed files with 7 additions and 4 deletions
|
@ -128,6 +128,9 @@
|
||||||
this.unset('unidentifiedDelivery');
|
this.unset('unidentifiedDelivery');
|
||||||
this.unset('unidentifiedDeliveryUnrestricted');
|
this.unset('unidentifiedDeliveryUnrestricted');
|
||||||
this.unset('hasFetchedProfile');
|
this.unset('hasFetchedProfile');
|
||||||
|
this.unset('tokens');
|
||||||
|
this.unset('lastMessage');
|
||||||
|
this.unset('lastMessageStatus');
|
||||||
},
|
},
|
||||||
|
|
||||||
isMe() {
|
isMe() {
|
||||||
|
@ -956,8 +959,8 @@
|
||||||
|
|
||||||
let hasChanged = false;
|
let hasChanged = false;
|
||||||
const { lastMessage, lastMessageStatus } = lastMessageUpdate;
|
const { lastMessage, lastMessageStatus } = lastMessageUpdate;
|
||||||
lastMessageUpdate.lastMessage = null;
|
delete lastMessageUpdate.lastMessage;
|
||||||
lastMessageUpdate.lastMessageStatus = null;
|
delete lastMessageUpdate.lastMessageStatus;
|
||||||
|
|
||||||
hasChanged = hasChanged || lastMessage !== this.lastMessage;
|
hasChanged = hasChanged || lastMessage !== this.lastMessage;
|
||||||
this.lastMessage = lastMessage;
|
this.lastMessage = lastMessage;
|
||||||
|
@ -1076,7 +1079,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
isSearchable() {
|
isSearchable() {
|
||||||
return !this.get('left') || !!this.get('lastMessage');
|
return !this.get('left');
|
||||||
},
|
},
|
||||||
|
|
||||||
async endSession() {
|
async endSession() {
|
||||||
|
|
|
@ -65,7 +65,7 @@ describe('ConversationSearchView', function() {
|
||||||
before(async function() {
|
before(async function() {
|
||||||
input = $('<input>');
|
input = $('<input>');
|
||||||
view = new Whisper.ConversationSearchView({ input: input }).render();
|
view = new Whisper.ConversationSearchView({ input: input }).render();
|
||||||
convo.set({ id: '2-search-view', lastMessage: 'asdf' });
|
convo.set({ id: '2-search-view', left: false });
|
||||||
|
|
||||||
await window.Signal.Data.saveConversation(convo.attributes, {
|
await window.Signal.Data.saveConversation(convo.attributes, {
|
||||||
Conversation: Whisper.Conversation,
|
Conversation: Whisper.Conversation,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue