1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-27 03:12:18 -05:00

ConversationActivity: Update status in onResume()

This commit is contained in:
Sebastian Kaspari 2010-03-20 23:15:29 +01:00
parent 710c7749f1
commit e0793a3bfa

View File

@ -96,8 +96,6 @@ public class ConversationActivity extends Activity implements ServiceConnection,
setContentView(R.layout.conversations); setContentView(R.layout.conversations);
((TextView) findViewById(R.id.title)).setText(server.getTitle()); ((TextView) findViewById(R.id.title)).setText(server.getTitle());
((ImageView) findViewById(R.id.status)).setImageResource(server.getStatusIcon());
((EditText) findViewById(R.id.input)).setOnKeyListener(this); ((EditText) findViewById(R.id.input)).setOnKeyListener(this);
deckAdapter = new DeckAdapter(); deckAdapter = new DeckAdapter();
@ -122,6 +120,8 @@ public class ConversationActivity extends Activity implements ServiceConnection,
{ {
super.onResume(); super.onResume();
((ImageView) findViewById(R.id.status)).setImageResource(server.getStatusIcon());
Intent intent = new Intent(this, IRCService.class); Intent intent = new Intent(this, IRCService.class);
bindService(intent, this, 0); bindService(intent, this, 0);
@ -135,6 +135,8 @@ public class ConversationActivity extends Activity implements ServiceConnection,
if (!server.isConnected()) { if (!server.isConnected()) {
((EditText) findViewById(R.id.input)).setEnabled(false); ((EditText) findViewById(R.id.input)).setEnabled(false);
} else {
((EditText) findViewById(R.id.input)).setEnabled(true);
} }
// Fill view with messages that have been buffered while paused // Fill view with messages that have been buffered while paused