Hide the progress bar after loading if no conversations were loaded.

This commit is contained in:
akwizgran
2013-05-31 14:33:36 +01:00
parent 4c480912a8
commit 77e778c58f

View File

@@ -125,6 +125,7 @@ implements OnClickListener, DatabaseListener, NoContactsDialog.Listener {
long duration = System.currentTimeMillis() - now;
if(LOG.isLoggable(INFO))
LOG.info("Full load took " + duration + " ms");
hideProgressBar();
} catch(DbException e) {
if(LOG.isLoggable(WARNING))
LOG.log(WARNING, e.toString(), e);
@@ -166,6 +167,15 @@ implements OnClickListener, DatabaseListener, NoContactsDialog.Listener {
});
}
private void hideProgressBar() {
runOnUiThread(new Runnable() {
public void run() {
list.setVisibility(VISIBLE);
loading.setVisibility(GONE);
}
});
}
private ConversationListItem findConversation(ContactId c) {
int count = adapter.getCount();
for(int i = 0; i < count; i++) {