v1.7.3: マストドン開発版の互換性のない変更への対応 https://github.com/tootsuite/mastodon/issues/5856
This commit is contained in:
parent
4db77eaf14
commit
20fd477952
|
@ -24,7 +24,7 @@
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
|
@ -65,7 +65,22 @@ public class TootRelationShip {
|
||||||
try{
|
try{
|
||||||
TootRelationShip dst = new TootRelationShip();
|
TootRelationShip dst = new TootRelationShip();
|
||||||
dst.id = Utils.optLongX(src, "id" );
|
dst.id = Utils.optLongX(src, "id" );
|
||||||
dst.following = src.optBoolean( "following" );
|
|
||||||
|
Object ov = src.opt("following");
|
||||||
|
if( ov instanceof Boolean ){
|
||||||
|
// 2.0 まで : following はboolean
|
||||||
|
dst.following = (Boolean) ov;
|
||||||
|
}else if( ov instanceof JSONObject ){
|
||||||
|
// https://github.com/tootsuite/mastodon/issues/5856
|
||||||
|
// issueに上げられたコミット: object ?
|
||||||
|
dst.following = true;
|
||||||
|
|
||||||
|
// TODO: 2.1リリース後に reblogs: true , false に対応する
|
||||||
|
}else{
|
||||||
|
dst.following = false;
|
||||||
|
log.d("'following' is not boolean ,not object.");
|
||||||
|
}
|
||||||
|
|
||||||
dst.followed_by = src.optBoolean( "followed_by" );
|
dst.followed_by = src.optBoolean( "followed_by" );
|
||||||
dst.blocking = src.optBoolean( "blocking" );
|
dst.blocking = src.optBoolean( "blocking" );
|
||||||
dst.muting = src.optBoolean( "muting" );
|
dst.muting = src.optBoolean( "muting" );
|
||||||
|
@ -79,6 +94,7 @@ public class TootRelationShip {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static class List extends ArrayList< TootRelationShip > {
|
public static class List extends ArrayList< TootRelationShip > {
|
||||||
public List(){
|
public List(){
|
||||||
super();
|
super();
|
||||||
|
|
Loading…
Reference in New Issue