mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-08 07:48:45 +01:00
added notifications_enabled for cached friendships
This commit is contained in:
parent
7593e56aa3
commit
b9de7a621f
@ -45,10 +45,6 @@ public class Relationship extends TwitterResponseObject implements TwitterRespon
|
|||||||
return object.target.followedBy;
|
return object.target.followedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSourceNotificationsEnabled() {
|
|
||||||
return object.source.notificationsEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSourceMutingTarget() {
|
public boolean isSourceMutingTarget() {
|
||||||
return object.source.muting;
|
return object.source.muting;
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,9 @@ public class ParcelableRelationship implements Parcelable {
|
|||||||
@CursorField(CachedRelationships.RETWEET_ENABLED)
|
@CursorField(CachedRelationships.RETWEET_ENABLED)
|
||||||
public boolean retweet_enabled;
|
public boolean retweet_enabled;
|
||||||
|
|
||||||
|
@CursorField(CachedRelationships.NOTIFICATIONS_ENABLED)
|
||||||
|
public boolean notifications_enabled;
|
||||||
|
|
||||||
@CursorField(value = CachedRelationships._ID, excludeWrite = true, type = TwidereDataStore.TYPE_PRIMARY_KEY)
|
@CursorField(value = CachedRelationships._ID, excludeWrite = true, type = TwidereDataStore.TYPE_PRIMARY_KEY)
|
||||||
public long _id;
|
public long _id;
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ import org.mariotaku.twidere.model.FiltersSubscriptionTableInfo;
|
|||||||
import org.mariotaku.twidere.model.ParcelableActivityTableInfo;
|
import org.mariotaku.twidere.model.ParcelableActivityTableInfo;
|
||||||
import org.mariotaku.twidere.model.ParcelableMessageConversationTableInfo;
|
import org.mariotaku.twidere.model.ParcelableMessageConversationTableInfo;
|
||||||
import org.mariotaku.twidere.model.ParcelableMessageTableInfo;
|
import org.mariotaku.twidere.model.ParcelableMessageTableInfo;
|
||||||
|
import org.mariotaku.twidere.model.ParcelableRelationship;
|
||||||
|
import org.mariotaku.twidere.model.ParcelableRelationshipTableInfo;
|
||||||
import org.mariotaku.twidere.model.ParcelableStatusTableInfo;
|
import org.mariotaku.twidere.model.ParcelableStatusTableInfo;
|
||||||
import org.mariotaku.twidere.model.ParcelableTrendTableInfo;
|
import org.mariotaku.twidere.model.ParcelableTrendTableInfo;
|
||||||
import org.mariotaku.twidere.model.ParcelableUserTableInfo;
|
import org.mariotaku.twidere.model.ParcelableUserTableInfo;
|
||||||
@ -853,12 +855,11 @@ public interface TwidereDataStore {
|
|||||||
|
|
||||||
String RETWEET_ENABLED = "retweet_enabled";
|
String RETWEET_ENABLED = "retweet_enabled";
|
||||||
|
|
||||||
String[] COLUMNS = {_ID, ACCOUNT_KEY, USER_KEY, FOLLOWING, FOLLOWED_BY, BLOCKING,
|
String NOTIFICATIONS_ENABLED = "notifications_enabled";
|
||||||
BLOCKED_BY, MUTING, RETWEET_ENABLED};
|
|
||||||
|
|
||||||
String[] TYPES = {TYPE_PRIMARY_KEY, TYPE_TEXT_NOT_NULL, TYPE_TEXT_NOT_NULL,
|
String[] COLUMNS = ParcelableRelationshipTableInfo.COLUMNS;
|
||||||
TYPE_BOOLEAN_DEFAULT_FALSE, TYPE_BOOLEAN_DEFAULT_FALSE, TYPE_BOOLEAN_DEFAULT_FALSE,
|
|
||||||
TYPE_BOOLEAN_DEFAULT_FALSE, TYPE_BOOLEAN_DEFAULT_FALSE, TYPE_BOOLEAN_DEFAULT_TRUE};
|
String[] TYPES = ParcelableRelationshipTableInfo.TYPES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
package org.mariotaku.bitpay.model;
|
||||||
|
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField;
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Mariotaku on 2017/3/16.
|
||||||
|
*/
|
||||||
|
@JsonObject
|
||||||
|
public class BuyerInfo {
|
||||||
|
@JsonField(name = "name")
|
||||||
|
String name;
|
||||||
|
@JsonField(name = "address1")
|
||||||
|
String address1;
|
||||||
|
@JsonField(name = "address2")
|
||||||
|
String address2;
|
||||||
|
@JsonField(name = "locality")
|
||||||
|
String locality;
|
||||||
|
@JsonField(name = "region")
|
||||||
|
String region;
|
||||||
|
@JsonField(name = "postalCode")
|
||||||
|
String postalCode;
|
||||||
|
@JsonField(name = "email")
|
||||||
|
String email;
|
||||||
|
@JsonField(name = "phone")
|
||||||
|
String phone;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress1() {
|
||||||
|
return address1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress2() {
|
||||||
|
return address2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocality() {
|
||||||
|
return locality;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegion() {
|
||||||
|
return region;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPostalCode() {
|
||||||
|
return postalCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone() {
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
}
|
@ -34,7 +34,7 @@ import static org.mariotaku.twidere.annotation.PreferenceType.STRING;
|
|||||||
public interface Constants extends TwidereConstants {
|
public interface Constants extends TwidereConstants {
|
||||||
|
|
||||||
String DATABASES_NAME = "twidere.sqlite";
|
String DATABASES_NAME = "twidere.sqlite";
|
||||||
int DATABASES_VERSION = 180;
|
int DATABASES_VERSION = 181;
|
||||||
|
|
||||||
int EXTRA_FEATURES_NOTICE_VERSION = 0;
|
int EXTRA_FEATURES_NOTICE_VERSION = 0;
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ public class ParcelableRelationshipUtils {
|
|||||||
obj.blocked_by = relationship.isSourceBlockedByTarget();
|
obj.blocked_by = relationship.isSourceBlockedByTarget();
|
||||||
obj.muting = relationship.isSourceMutingTarget();
|
obj.muting = relationship.isSourceMutingTarget();
|
||||||
obj.retweet_enabled = relationship.isSourceWantRetweetsFromTarget();
|
obj.retweet_enabled = relationship.isSourceWantRetweetsFromTarget();
|
||||||
|
obj.notifications_enabled = relationship.isSourceNotificationsEnabledForTarget();
|
||||||
obj.can_dm = relationship.canSourceDMTarget();
|
obj.can_dm = relationship.canSourceDMTarget();
|
||||||
}
|
}
|
||||||
obj.filtering = filtering;
|
obj.filtering = filtering;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user