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

Clear conversations on reconnect

This commit is contained in:
Sebastian Kaspari 2010-04-13 21:55:47 +02:00
parent f3a3afcd13
commit 1f7d496f77

View File

@ -66,6 +66,7 @@ import org.yaaic.model.Extra;
import org.yaaic.model.Message;
import org.yaaic.model.Scrollback;
import org.yaaic.model.Server;
import org.yaaic.model.ServerInfo;
import org.yaaic.model.Status;
import org.yaaic.receiver.ConversationReceiver;
import org.yaaic.receiver.ServerReceiver;
@ -367,6 +368,9 @@ public class ConversationActivity extends Activity implements ServiceConnection,
.setCancelable(false)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
server.clearConversations();
deckAdapter.clearConversations();
deckAdapter.addItem(server.getConversation(ServerInfo.DEFAULT_NAME));
binder.connect(server);
}
})