1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 17:02:21 -05:00

Don't show conversation name at top if ServerInfo view is selected

This commit is contained in:
Sebastian Kaspari 2010-03-10 22:52:48 +01:00
parent b8043453bd
commit 7174eb356e

View File

@ -349,15 +349,18 @@ public class ServerActivity extends Activity implements ServiceConnection, Chann
public void onItemSelected(AdapterView<?> deck, View view, int position, long id) public void onItemSelected(AdapterView<?> deck, View view, int position, long id)
{ {
Conversation conversation = (Conversation) deck.getItemAtPosition(position); Conversation conversation = (Conversation) deck.getItemAtPosition(position);
if (conversation != null) {
if (conversation != null && conversation.getType() != Conversation.TYPE_SERVER) {
((TextView) findViewById(R.id.title)).setText(server.getTitle() + " - " + conversation.getName()); ((TextView) findViewById(R.id.title)).setText(server.getTitle() + " - " + conversation.getName());
} else {
onNothingSelected(deck);
} }
} }
/** /**
* On no channel selected/focused * On no channel selected/focused
*/ */
public void onNothingSelected(AdapterView<?> arg0) public void onNothingSelected(AdapterView<?> deck)
{ {
((TextView) findViewById(R.id.title)).setText(server.getTitle()); ((TextView) findViewById(R.id.title)).setText(server.getTitle());
} }