Removed unnecessary conditionals from logging statements.

Very important stuff.
This commit is contained in:
akwizgran
2014-03-12 21:00:14 +00:00
parent 375a597dd2
commit b99a503f24
33 changed files with 165 additions and 240 deletions

View File

@@ -233,15 +233,15 @@ ConnectionListener {
loadContacts();
} else if(e instanceof ContactRemovedEvent) {
// Reload the conversation, expecting NoSuchContactException
if(LOG.isLoggable(INFO)) LOG.info("Contact removed, reloading");
LOG.info("Contact removed, reloading");
reloadContact(((ContactRemovedEvent) e).getContactId());
} else if(e instanceof MessageAddedEvent) {
if(LOG.isLoggable(INFO)) LOG.info("Message added, reloading");
LOG.info("Message added, reloading");
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");
LOG.info("Message expired, reloading");
loadContacts();
}
}

View File

@@ -369,17 +369,17 @@ implements EventListener, OnClickListener, OnItemClickListener {
if(e instanceof ContactRemovedEvent) {
ContactRemovedEvent c = (ContactRemovedEvent) e;
if(c.getContactId().equals(contactId)) {
if(LOG.isLoggable(INFO)) LOG.info("Contact removed");
LOG.info("Contact removed");
finishOnUiThread();
}
} else if(e instanceof MessageAddedEvent) {
GroupId g = ((MessageAddedEvent) e).getGroup().getId();
if(g.equals(groupId)) {
if(LOG.isLoggable(INFO)) LOG.info("Message added, reloading");
LOG.info("Message added, reloading");
loadHeaders();
}
} else if(e instanceof MessageExpiredEvent) {
if(LOG.isLoggable(INFO)) LOG.info("Message expired, reloading");
LOG.info("Message expired, reloading");
loadHeaders();
}
}