fixed follow and accept request action
This commit is contained in:
parent
da601717d5
commit
0e2fee3ee6
|
@ -96,6 +96,7 @@ import org.mariotaku.twidere.util.JsonSerializer;
|
|||
import org.mariotaku.twidere.util.OAuthPasswordAuthenticator;
|
||||
import org.mariotaku.twidere.util.OAuthPasswordAuthenticator.AuthenticationException;
|
||||
import org.mariotaku.twidere.util.OAuthPasswordAuthenticator.AuthenticityTokenException;
|
||||
import org.mariotaku.twidere.util.OAuthPasswordAuthenticator.LoginVerificationCallback;
|
||||
import org.mariotaku.twidere.util.OAuthPasswordAuthenticator.LoginVerificationException;
|
||||
import org.mariotaku.twidere.util.OAuthPasswordAuthenticator.WrongUserPassException;
|
||||
import org.mariotaku.twidere.util.ParseUtils;
|
||||
|
@ -828,7 +829,7 @@ public class SignInActivity extends BaseActivity implements OnClickListener, Tex
|
|||
|
||||
}
|
||||
|
||||
class InputLoginVerificationCallback implements OAuthPasswordAuthenticator.LoginVerificationCallback {
|
||||
class InputLoginVerificationCallback implements LoginVerificationCallback {
|
||||
|
||||
boolean isChallengeFinished;
|
||||
String challengeResponse;
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.mariotaku.twidere.loader.IncomingFriendshipsLoader;
|
|||
import org.mariotaku.twidere.model.ParcelableUser;
|
||||
import org.mariotaku.twidere.model.UserKey;
|
||||
import org.mariotaku.twidere.model.message.FriendshipTaskEvent;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.view.holder.UserViewHolder;
|
||||
|
||||
public class IncomingFriendshipsFragment extends CursorSupportUsersListFragment implements
|
||||
|
@ -51,7 +52,14 @@ public class IncomingFriendshipsFragment extends CursorSupportUsersListFragment
|
|||
@Override
|
||||
protected ParcelableUsersAdapter onCreateAdapter(Context context, boolean compact) {
|
||||
final ParcelableUsersAdapter adapter = super.onCreateAdapter(context, compact);
|
||||
adapter.setRequestClickListener(this);
|
||||
final Bundle args = getArguments();
|
||||
final UserKey accountKey = args.getParcelable(EXTRA_ACCOUNT_KEY);
|
||||
if (accountKey != null && USER_TYPE_FANFOU_COM.equals(accountKey.getHost()) &&
|
||||
Utils.isOfficialCredentials(context, accountKey)) {
|
||||
adapter.setRequestClickListener(this);
|
||||
} else {
|
||||
adapter.setRequestClickListener(null);
|
||||
}
|
||||
return adapter;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ import org.mariotaku.twidere.util.KeyboardShortcutsHandler;
|
|||
import org.mariotaku.twidere.util.KeyboardShortcutsHandler.KeyboardShortcutCallback;
|
||||
import org.mariotaku.twidere.util.ParcelUtils;
|
||||
import org.mariotaku.twidere.util.RecyclerViewNavigationHelper;
|
||||
import org.mariotaku.twidere.util.Utils;
|
||||
import org.mariotaku.twidere.view.holder.UserViewHolder;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -103,11 +102,7 @@ public abstract class ParcelableUsersFragment extends AbsContentListRecyclerView
|
|||
@Override
|
||||
protected ParcelableUsersAdapter onCreateAdapter(Context context, boolean compact) {
|
||||
final ParcelableUsersAdapter adapter = new ParcelableUsersAdapter(context);
|
||||
if (Utils.isOfficialCredentials(context, Utils.getAccountKey(context, getArguments()))) {
|
||||
adapter.setFollowClickListener(this);
|
||||
} else {
|
||||
adapter.setFollowClickListener(null);
|
||||
}
|
||||
adapter.setFollowClickListener(this);
|
||||
return adapter;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue