mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-02-19 20:31:49 -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());
|
((ImageView) findViewById(R.id.status)).setImageResource(server.getStatusIcon());
|
||||||
|
|
||||||
EditText input = (EditText) findViewById(R.id.input);
|
EditText input = (EditText) findViewById(R.id.input);
|
||||||
|
|
||||||
if (server.isConnected()) {
|
if (server.isConnected()) {
|
||||||
input.setEnabled(true);
|
input.setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
input.setEnabled(false);
|
input.setEnabled(false);
|
||||||
|
|
||||||
|
if (server.getStatus() == Status.CONNECTING) {
|
||||||
|
deckAdapter.clearConversations();
|
||||||
|
deckAdapter.addItem(server.getConversation(ServerInfo.DEFAULT_NAME));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!binder.getService().getSettings().isReconnectEnabled()) {
|
if (!binder.getService().getSettings().isReconnectEnabled()) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setMessage("You disconnected from " + server.getTitle() + ". Do you want to reconnect?")
|
builder.setMessage("You disconnected from " + server.getTitle() + ". Do you want to reconnect?")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user