mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +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());
|
||||
} else if(e instanceof MessageAddedEvent) {
|
||||
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) {
|
||||
if(LOG.isLoggable(INFO)) LOG.info("Message expired, reloading");
|
||||
loadContacts();
|
||||
|
||||
@@ -201,7 +201,8 @@ implements DatabaseListener, OnClickListener, OnItemClickListener {
|
||||
});
|
||||
}
|
||||
} 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");
|
||||
loadHeaders();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user