aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/ContactDetailsActivity.java14
-rw-r--r--src/eu/siacs/conversations/ui/ManageAccountActivity.java4
2 files changed, 17 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
index 46e5ab32..5dc6eb3b 100644
--- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
+++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
@@ -42,6 +42,7 @@ public class ContactDetailsActivity extends XmppActivity {
private TextView contactJid;
private TextView accountJid;
private TextView status;
+ private TextView askAgain;
private CheckBox send;
private CheckBox receive;
private QuickContactBadge badge;
@@ -107,6 +108,7 @@ public class ContactDetailsActivity extends XmppActivity {
status = (TextView) findViewById(R.id.details_contactstatus);
send = (CheckBox) findViewById(R.id.details_send_presence);
receive = (CheckBox) findViewById(R.id.details_receive_presence);
+ askAgain = (TextView) findViewById(R.id.ask_again);
badge = (QuickContactBadge) findViewById(R.id.details_contact_badge);
keys = (LinearLayout) findViewById(R.id.details_contact_keys);
getActionBar().setHomeButtonEnabled(true);
@@ -177,7 +179,17 @@ public class ContactDetailsActivity extends XmppActivity {
if (contact.getSubscriptionOption(Contact.Subscription.TO)) {
receive.setChecked(true);
} else {
- receive.setText("Request presence updates");
+ receive.setText("Ask for presence updates");
+ askAgain.setVisibility(View.VISIBLE);
+ askAgain.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ Toast.makeText(getApplicationContext(), "Asked for presence updates",Toast.LENGTH_SHORT).show();
+ xmppConnectionService.requestPresenceUpdatesFrom(contact);
+
+ }
+ });
if (contact.getSubscriptionOption(Contact.Subscription.ASKING)) {
receive.setChecked(true);
} else {
diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java
index 22f7c78f..7cf39e78 100644
--- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -175,6 +175,10 @@ public class ManageAccountActivity extends XmppActivity {
statusView.setText("registration completed");
statusView.setTextColor(0xFF83b600);
break;
+ case Account.STATUS_REGISTRATION_NOT_SUPPORTED:
+ statusView.setText("server does not support registration");
+ statusView.setTextColor(0xFFe92727);
+ break;
default:
statusView.setText("");
break;