mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Fixed a NullPointerException when a local message triggered an event.
This commit is contained in:
@@ -239,7 +239,9 @@ implements OnClickListener, DatabaseListener, ConnectionListener {
|
|||||||
reloadContact(((ContactRemovedEvent) e).getContactId());
|
reloadContact(((ContactRemovedEvent) e).getContactId());
|
||||||
} else if(e instanceof MessageAddedEvent) {
|
} else if(e instanceof MessageAddedEvent) {
|
||||||
if(LOG.isLoggable(INFO)) LOG.info("Message added, reloading");
|
if(LOG.isLoggable(INFO)) LOG.info("Message added, reloading");
|
||||||
reloadContact(((MessageAddedEvent) e).getContactId());
|
ContactId source = ((MessageAddedEvent) e).getContactId();
|
||||||
|
if(source == null) loadContacts();
|
||||||
|
else reloadContact(source);
|
||||||
} else if(e instanceof MessageExpiredEvent) {
|
} else if(e instanceof MessageExpiredEvent) {
|
||||||
if(LOG.isLoggable(INFO)) LOG.info("Message expired, reloading");
|
if(LOG.isLoggable(INFO)) LOG.info("Message expired, reloading");
|
||||||
loadContacts();
|
loadContacts();
|
||||||
|
|||||||
@@ -201,7 +201,8 @@ implements DatabaseListener, OnClickListener, OnItemClickListener {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if(e instanceof MessageAddedEvent) {
|
} else if(e instanceof MessageAddedEvent) {
|
||||||
if(((MessageAddedEvent) e).getContactId().equals(contactId)) {
|
ContactId source = ((MessageAddedEvent) e).getContactId();
|
||||||
|
if(source == null || source.equals(contactId)) {
|
||||||
if(LOG.isLoggable(INFO)) LOG.info("Message added, reloading");
|
if(LOG.isLoggable(INFO)) LOG.info("Message added, reloading");
|
||||||
loadHeaders();
|
loadHeaders();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user