fixed friendship displaying on fanfou
This commit is contained in:
parent
8a8b09214e
commit
ffb8101bf1
|
@ -31,9 +31,9 @@ import com.hannesdorfmann.parcelableplease.annotation.ParcelableThisPlease;
|
||||||
import org.mariotaku.library.objectcursor.annotation.AfterCursorObjectCreated;
|
import org.mariotaku.library.objectcursor.annotation.AfterCursorObjectCreated;
|
||||||
import org.mariotaku.library.objectcursor.annotation.CursorField;
|
import org.mariotaku.library.objectcursor.annotation.CursorField;
|
||||||
import org.mariotaku.library.objectcursor.annotation.CursorObject;
|
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.UserKeyConverter;
|
||||||
import org.mariotaku.twidere.model.util.UserKeyCursorFieldConverter;
|
import org.mariotaku.twidere.model.util.UserKeyCursorFieldConverter;
|
||||||
import org.mariotaku.twidere.model.util.LoganSquareCursorFieldConverter;
|
|
||||||
import org.mariotaku.twidere.provider.TwidereDataStore.CachedUsers;
|
import org.mariotaku.twidere.provider.TwidereDataStore.CachedUsers;
|
||||||
|
|
||||||
|
|
||||||
|
@ -318,6 +318,10 @@ public class ParcelableUser implements Parcelable, Comparable<ParcelableUser> {
|
||||||
@JsonField(name = "groups_count")
|
@JsonField(name = "groups_count")
|
||||||
@ParcelableThisPlease
|
@ParcelableThisPlease
|
||||||
public long groups_count = -1;
|
public long groups_count = -1;
|
||||||
|
@JsonField(name = "unique_id")
|
||||||
|
@ParcelableThisPlease
|
||||||
|
public String unique_id;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int describeContents() {
|
public int describeContents() {
|
||||||
|
|
|
@ -1863,8 +1863,12 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean check(@NonNull ParcelableUser user) {
|
public boolean check(@NonNull ParcelableUser user) {
|
||||||
return TextUtils.equals(relationship.getSourceUserId(), user.account_key.getId())
|
if (!TextUtils.equals(relationship.getSourceUserId(), user.account_key.getId())) {
|
||||||
&& user.key.check(relationship.getTargetUserId(), null);
|
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.profile_image_url_profile_size = user.getProfileImageUrlLarge();
|
||||||
}
|
}
|
||||||
extras.groups_count = user.getGroupsCount();
|
extras.groups_count = user.getGroupsCount();
|
||||||
|
extras.unique_id = user.getUniqueId();
|
||||||
obj.extras = extras;
|
obj.extras = extras;
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue