v1.7.3: マストドン開発版の互換性のない変更への対応 https://github.com/tootsuite/mastodon/issues/5856
This commit is contained in:
parent
4db77eaf14
commit
20fd477952
|
@ -24,7 +24,7 @@
|
|||
</value>
|
||||
</option>
|
||||
</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" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
|
|
@ -65,7 +65,22 @@ public class TootRelationShip {
|
|||
try{
|
||||
TootRelationShip dst = new TootRelationShip();
|
||||
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.blocking = src.optBoolean( "blocking" );
|
||||
dst.muting = src.optBoolean( "muting" );
|
||||
|
@ -79,6 +94,7 @@ public class TootRelationShip {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public static class List extends ArrayList< TootRelationShip > {
|
||||
public List(){
|
||||
super();
|
||||
|
|
Loading…
Reference in New Issue