ConversationActivity: clear conversations if server is in PRE_CONNECTING state

This commit is contained in:
Sebastian Kaspari 2010-04-15 21:00:39 +02:00
parent d90c8b3081
commit 75feb90a95
1 changed files with 6 additions and 0 deletions

View File

@ -121,6 +121,12 @@ public class ConversationActivity extends Activity implements ServiceConnection,
deck.setAdapter(deckAdapter);
deck.setOnItemClickListener(this);
deck.setBackgroundDrawable(new NonScalingBackgroundDrawable(this, deck, R.drawable.background));
if (server.getStatus() == Status.PRE_CONNECTING) {
server.clearConversations();
deckAdapter.clearConversations();
}
switcher = (ViewSwitcher) findViewById(R.id.switcher);