Merge pull request #469 from TwidereProject/develop

Develop
This commit is contained in:
Mariotaku 2016-03-20 21:44:41 +08:00
commit 6f30b9bd74
4 changed files with 14 additions and 5 deletions

View File

@ -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() {

View File

@ -21,8 +21,8 @@ android {
applicationId "org.mariotaku.twidere" applicationId "org.mariotaku.twidere"
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 23 targetSdkVersion 23
versionCode 160 versionCode 161
versionName "3.1.0.3" versionName "3.1.0.4"
multiDexEnabled true multiDexEnabled true
generatedDensities = [] generatedDensities = []

View File

@ -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());
} }
} }

View File

@ -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;
} }