aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-14 18:56:52 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-14 18:56:52 +0100
commit4e20b81bd9a7e91c8570328e7390726d07aecff2 (patch)
tree5a091100385dc5fdb67eb71dd084dc7d30bed0bb /src/eu/siacs/conversations/ui/ContactDetailsActivity.java
parent71cb5548eb453be94ea62e6e2b87d654287c2d29 (diff)
fixed problem with null messages. added ask again button
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/ContactDetailsActivity.java14
1 files changed, 13 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 {