mark missed calls as unread (bold) in overview. fixes #3687

This commit is contained in:
Daniel Gultsch 2020-05-03 18:07:00 +02:00
parent 6888f57191
commit 3c3f5d8e6f
2 changed files with 8 additions and 4 deletions

View File

@ -196,13 +196,14 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
public void findUnreadMessages(OnMessageFound onMessageFound) {
final ArrayList<Message> results = new ArrayList<>();
synchronized (this.messages) {
for (Message message : this.messages) {
if (!message.isRead()) {
results.add(message);
for (final Message message : this.messages) {
if (message.isRead() || message.getType() == Message.TYPE_RTP_SESSION) {
continue;
}
results.add(message);
}
}
for (Message result : results) {
for (final Message result : results) {
onMessageFound.onMessageFound(result);
}
}

View File

@ -564,9 +564,11 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": timeout reached for ringing");
switch (this.state) {
case PROPOSED:
message.markUnread();
rejectCallFromProposed();
break;
case SESSION_INITIALIZED:
message.markUnread();
rejectCallFromSessionInitiate();
break;
}
@ -616,6 +618,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
this.message.setServerMsgId(serverMsgId);
}
this.message.setTime(timestamp);
this.message.markUnread();
writeLogMessageMissed();
finish();
} else {