aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-01-13 16:10:09 +0100
committersteckbrief <steckbrief@chefmail.de>2016-01-13 16:10:09 +0100
commit8644c4676a5fda9d642244ff70e72c5fe524a24d (patch)
treeaa3638db5eb30c25cbd250f675a5a1e61b2a99ab /src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
parent0fe5ce481fe72d3821a93b2792d6ae16b04bec7d (diff)
Moved all avatar related work to AvatarService
- fetchAvatar, fetchAvatarPep, fetchAvatarVcard, checkForAvatar moved from XmppConnectionService to AvatarService - Several unused imports removed - XmppSendUtil introduced to enable presencePacket and iqPacket sending without using XmppConnectionService since the account has everything needed - UiUpdateHelper introduced to enable UI updates without using XmppConnectionService directly
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
index 822234c7..601ddedc 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/EditAccountActivity.java
@@ -25,6 +25,7 @@ import android.widget.Toast;
import de.thedevstack.conversationsplus.R;
import de.thedevstack.conversationsplus.entities.Account;
+import de.thedevstack.conversationsplus.services.AvatarService;
import de.thedevstack.conversationsplus.services.XmppConnectionService.OnAccountUpdate;
import de.thedevstack.conversationsplus.ui.adapter.KnownHostsAdapter;
import de.thedevstack.conversationsplus.ui.listeners.ShowResourcesListDialogListener;
@@ -157,7 +158,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
&& mAccount.getStatus() == Account.State.ONLINE) {
if (!mFetchingAvatar) {
mFetchingAvatar = true;
- xmppConnectionService.checkForAvatar(mAccount,
+ AvatarService.getInstance().checkForAvatar(mAccount,
mAvatarFetchCallback);
}
} else {
@@ -427,7 +428,7 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
}
if (this.jidToEdit != null) {
this.mAvatar.setVisibility(View.VISIBLE);
- this.mAvatar.setImageBitmap(avatarService().get(this.mAccount, getPixel(72)));
+ this.mAvatar.setImageBitmap(AvatarService.getInstance().get(this.mAccount, getPixel(72)));
}
if (this.mAccount.isOptionSet(Account.OPTION_REGISTER)) {
this.mRegisterNew.setVisibility(View.VISIBLE);