1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2025-02-16 15:00:14 -05:00

ConversationActivity: Set selected status on conversation

This commit is contained in:
Sebastian Kaspari 2010-05-12 10:30:07 +02:00
parent dbb522370c
commit 1f1122b138

View File

@ -71,6 +71,7 @@ import org.yaaic.model.Status;
import org.yaaic.receiver.ConversationReceiver;
import org.yaaic.receiver.ServerReceiver;
import org.yaaic.view.MessageListView;
import org.yaaic.view.ConversationSwitcher;
/**
* The server view with a scrollable list of all channels
@ -174,6 +175,8 @@ public class ConversationActivity extends Activity implements ServiceConnection,
} else {
((EditText) findViewById(R.id.input)).setEnabled(true);
}
((ConversationSwitcher) findViewById(R.id.dots)).setServer(server);
// Optimization - cache field lookup
Collection<Conversation> mConversations = server.getConversations();
@ -574,6 +577,8 @@ public class ConversationActivity extends Activity implements ServiceConnection,
// Remember selection
if (conversation != null) {
server.getConversation(server.getSelectedConversation()).setStatus(Conversation.STATUS_DEFAULT);
conversation.setStatus(Conversation.STATUS_SELECTED);
server.setSelectedConversation(conversation.getName());
}
}