commit
6f30b9bd74
|
@ -31,9 +31,9 @@ import com.hannesdorfmann.parcelableplease.annotation.ParcelableThisPlease;
|
|||
import org.mariotaku.library.objectcursor.annotation.AfterCursorObjectCreated;
|
||||
import org.mariotaku.library.objectcursor.annotation.CursorField;
|
||||
import org.mariotaku.library.objectcursor.annotation.CursorObject;
|
||||
import org.mariotaku.twidere.model.util.LoganSquareCursorFieldConverter;
|
||||
import org.mariotaku.twidere.model.util.UserKeyConverter;
|
||||
import org.mariotaku.twidere.model.util.UserKeyCursorFieldConverter;
|
||||
import org.mariotaku.twidere.model.util.LoganSquareCursorFieldConverter;
|
||||
import org.mariotaku.twidere.provider.TwidereDataStore.CachedUsers;
|
||||
|
||||
|
||||
|
@ -318,6 +318,10 @@ public class ParcelableUser implements Parcelable, Comparable<ParcelableUser> {
|
|||
@JsonField(name = "groups_count")
|
||||
@ParcelableThisPlease
|
||||
public long groups_count = -1;
|
||||
@JsonField(name = "unique_id")
|
||||
@ParcelableThisPlease
|
||||
public String unique_id;
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
|
|
|
@ -21,8 +21,8 @@ android {
|
|||
applicationId "org.mariotaku.twidere"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
versionCode 160
|
||||
versionName "3.1.0.3"
|
||||
versionCode 161
|
||||
versionName "3.1.0.4"
|
||||
multiDexEnabled true
|
||||
|
||||
generatedDensities = []
|
||||
|
|
|
@ -1863,8 +1863,12 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
|
|||
}
|
||||
|
||||
public boolean check(@NonNull ParcelableUser user) {
|
||||
return TextUtils.equals(relationship.getSourceUserId(), user.account_key.getId())
|
||||
&& user.key.check(relationship.getTargetUserId(), null);
|
||||
if (!TextUtils.equals(relationship.getSourceUserId(), user.account_key.getId())) {
|
||||
return false;
|
||||
}
|
||||
final String targetUserId = relationship.getTargetUserId();
|
||||
return (user.extras != null && TextUtils.equals(targetUserId, user.extras.unique_id))
|
||||
|| TextUtils.equals(targetUserId, user.key.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ public class ParcelableUserUtils implements TwidereConstants {
|
|||
extras.profile_image_url_profile_size = user.getProfileImageUrlLarge();
|
||||
}
|
||||
extras.groups_count = user.getGroupsCount();
|
||||
extras.unique_id = user.getUniqueId();
|
||||
obj.extras = extras;
|
||||
return obj;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue