Skip to content

Commit

Permalink
Replacing use of AccountHelper with AccountStore
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonye committed May 3, 2017
1 parent bb83af6 commit 439a184
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<PublicizeConnectionAdapter.ConnectionViewHolder> {

public interface OnAdapterLoadedListener {
void onAdapterLoaded(boolean isEmpty);
}

@Inject AccountStore mAccountStore;

private final PublicizeConnectionList mConnections = new PublicizeConnectionList();

private final int mSiteId;
Expand All @@ -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);
}

Expand Down

0 comments on commit 439a184

Please sign in to comment.