aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/parser
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-08-21 12:32:50 +0200
committeriNPUTmice <daniel@gultsch.de>2014-08-21 12:32:50 +0200
commit4875b52f09eba8e32285e92372f076413d4f649f (patch)
tree8cb208ddc2c85998ca86baf214029dce13d2853b /src/eu/siacs/conversations/parser
parent301477c764f4f23ff223f931b44179b5e09b5d0d (diff)
make avatars persisent / available even without internet
Diffstat (limited to 'src/eu/siacs/conversations/parser')
-rw-r--r--src/eu/siacs/conversations/parser/MessageParser.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java
index 7de7e9e1..e3cb1a1e 100644
--- a/src/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/eu/siacs/conversations/parser/MessageParser.java
@@ -301,7 +301,9 @@ public class MessageParser extends AbstractParser implements
if (mXmppConnectionService.getFileBackend().isAvatarCached(
avatar)) {
if (account.getJid().equals(from)) {
- account.setAvatar(avatar.getFilename());
+ if (account.setAvatar(avatar.getFilename())) {
+ mXmppConnectionService.databaseBackend.updateAccount(account);
+ }
} else {
Contact contact = account.getRoster().getContact(from);
contact.setAvatar(avatar.getFilename());