aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-08-15 19:12:51 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-08-15 19:12:51 +0200
commitecac1e59434b78faf75c3a461abada5928c0b73c (patch)
tree56e9d78f1edbae0166ce3085fa544f5564a865d0 /src/main/java
parent1f34fb742ceaa941f48ca858010961f834e3d1b8 (diff)
parent6aec49f06d3d6be9695a4f4f958f201880d09abc (diff)
Merge branch 'development'
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java b/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java
index cf22416f..0e685c3e 100644
--- a/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java
@@ -32,6 +32,8 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate
private boolean hasNoTrustedKeys = true;
private Contact contact;
+ private TextView keyErrorMessage;
+ private LinearLayout keyErrorMessageCard;
private TextView ownKeysTitle;
private LinearLayout ownKeys;
private LinearLayout ownKeysCard;
@@ -92,6 +94,8 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate
}
hasNoTrustedKeys = getIntent().getBooleanExtra("has_no_trusted", false);
+ keyErrorMessageCard = (LinearLayout) findViewById(R.id.key_error_message_card);
+ keyErrorMessage = (TextView) findViewById(R.id.key_error_message);
ownKeysTitle = (TextView) findViewById(R.id.own_keys_title);
ownKeys = (LinearLayout) findViewById(R.id.own_keys_details);
ownKeysCard = (LinearLayout) findViewById(R.id.own_keys_card);
@@ -157,6 +161,12 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate
setFetching();
lock();
} else {
+ if (!hasForeignKeys && !hasOtherTrustedKeys) {
+ keyErrorMessageCard.setVisibility(View.VISIBLE);
+ keyErrorMessage.setText(R.string.error_no_keys_to_trust);
+ ownKeys.removeAllViews(); ownKeysCard.setVisibility(View.GONE);
+ foreignKeys.removeAllViews(); foreignKeysCard.setVisibility(View.GONE);
+ }
lockOrUnlockAsNeeded();
setDone();
}