mark missed calls as unread (bold) in overview. fixes #3687
This commit is contained in:
parent
6888f57191
commit
3c3f5d8e6f
|
@ -196,13 +196,14 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
||||||
public void findUnreadMessages(OnMessageFound onMessageFound) {
|
public void findUnreadMessages(OnMessageFound onMessageFound) {
|
||||||
final ArrayList<Message> results = new ArrayList<>();
|
final ArrayList<Message> results = new ArrayList<>();
|
||||||
synchronized (this.messages) {
|
synchronized (this.messages) {
|
||||||
for (Message message : this.messages) {
|
for (final Message message : this.messages) {
|
||||||
if (!message.isRead()) {
|
if (message.isRead() || message.getType() == Message.TYPE_RTP_SESSION) {
|
||||||
results.add(message);
|
continue;
|
||||||
}
|
}
|
||||||
|
results.add(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Message result : results) {
|
for (final Message result : results) {
|
||||||
onMessageFound.onMessageFound(result);
|
onMessageFound.onMessageFound(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -564,9 +564,11 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
||||||
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": timeout reached for ringing");
|
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": timeout reached for ringing");
|
||||||
switch (this.state) {
|
switch (this.state) {
|
||||||
case PROPOSED:
|
case PROPOSED:
|
||||||
|
message.markUnread();
|
||||||
rejectCallFromProposed();
|
rejectCallFromProposed();
|
||||||
break;
|
break;
|
||||||
case SESSION_INITIALIZED:
|
case SESSION_INITIALIZED:
|
||||||
|
message.markUnread();
|
||||||
rejectCallFromSessionInitiate();
|
rejectCallFromSessionInitiate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -616,6 +618,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
||||||
this.message.setServerMsgId(serverMsgId);
|
this.message.setServerMsgId(serverMsgId);
|
||||||
}
|
}
|
||||||
this.message.setTime(timestamp);
|
this.message.setTime(timestamp);
|
||||||
|
this.message.markUnread();
|
||||||
writeLogMessageMissed();
|
writeLogMessageMissed();
|
||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue