mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-02-16 23:10:11 -05:00
Clear conversations on reconnect
This commit is contained in:
parent
8766f785a0
commit
acc22fe296
@ -382,11 +382,18 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
||||
((ImageView) findViewById(R.id.status)).setImageResource(server.getStatusIcon());
|
||||
|
||||
EditText input = (EditText) findViewById(R.id.input);
|
||||
|
||||
if (server.isConnected()) {
|
||||
input.setEnabled(true);
|
||||
} else {
|
||||
input.setEnabled(false);
|
||||
|
||||
if (server.getStatus() == Status.CONNECTING) {
|
||||
deckAdapter.clearConversations();
|
||||
deckAdapter.addItem(server.getConversation(ServerInfo.DEFAULT_NAME));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!binder.getService().getSettings().isReconnectEnabled()) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setMessage("You disconnected from " + server.getTitle() + ". Do you want to reconnect?")
|
||||
|
Loading…
Reference in New Issue
Block a user