From 439a184be2b4d62cb63a2ef7928287c8e5d9ce26 Mon Sep 17 00:00:00 2001 From: Will Kwon Date: Wed, 3 May 2017 15:57:47 -0700 Subject: [PATCH] Replacing use of AccountHelper with AccountStore --- .../ui/publicize/adapters/PublicizeConnectionAdapter.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/publicize/adapters/PublicizeConnectionAdapter.java b/WordPress/src/main/java/org/wordpress/android/ui/publicize/adapters/PublicizeConnectionAdapter.java index e943dc4a24ba..b346877d5a28 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/publicize/adapters/PublicizeConnectionAdapter.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/publicize/adapters/PublicizeConnectionAdapter.java @@ -9,7 +9,7 @@ import org.wordpress.android.R; import org.wordpress.android.datasets.PublicizeTable; -import org.wordpress.android.models.AccountHelper; +import org.wordpress.android.fluxc.store.AccountStore; import org.wordpress.android.models.PublicizeConnection; import org.wordpress.android.models.PublicizeConnectionList; import org.wordpress.android.ui.publicize.ConnectButton; @@ -19,12 +19,16 @@ import org.wordpress.android.util.StringUtils; import org.wordpress.android.widgets.WPNetworkImageView; +import javax.inject.Inject; + public class PublicizeConnectionAdapter extends RecyclerView.Adapter { public interface OnAdapterLoadedListener { void onAdapterLoaded(boolean isEmpty); } + @Inject AccountStore mAccountStore; + private final PublicizeConnectionList mConnections = new PublicizeConnectionList(); private final int mSiteId; @@ -40,7 +44,7 @@ public PublicizeConnectionAdapter(Context context, int siteId, String serviceId) mSiteId = siteId; mAvatarSz = context.getResources().getDimensionPixelSize(R.dimen.avatar_sz_extra_small); mServiceId = StringUtils.notNullStr(serviceId); - mCurrentUserId = AccountHelper.getDefaultAccount().getUserId(); + mCurrentUserId = mAccountStore.getAccount().getUserId(); setHasStableIds(true); }