aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-05-10 20:20:22 +0200
committerChristian Schneppe <christian@pix-art.de>2017-05-10 20:20:22 +0200
commitf78fbcffa5754665ae4744b854b306da749c854a (patch)
treea0f455d5a7bc9f4ccd83fd8557d7c0988a200a43 /src/main/java/de/pixart/messenger/entities
parent01aca0599d7f7689e7ebdc6f5e8834de93fac391 (diff)
display open pgp key id in account details and allow to delete
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Account.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Account.java b/src/main/java/de/pixart/messenger/entities/Account.java
index e9fb800cc..18e991367 100644
--- a/src/main/java/de/pixart/messenger/entities/Account.java
+++ b/src/main/java/de/pixart/messenger/entities/Account.java
@@ -554,7 +554,11 @@ public class Account extends AbstractEntity {
public boolean setPgpSignId(long pgpID) {
synchronized (this.keys) {
try {
- keys.put(KEY_PGP_ID, pgpID);
+ if (pgpID == 0) {
+ keys.remove(KEY_PGP_ID);
+ } else {
+ keys.put(KEY_PGP_ID, pgpID);
+ }
} catch (JSONException e) {
return false;
}