Created
August 25, 2017 03:50
-
-
Save tateisu/7b12898af2eb4f4d7412297deb68bc64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( item instanceof MSPToot ){ | |
showStatus( activity, (MSPToot) item ); | |
}else if( item instanceof String ){ | |
showSearchTag( (String) item ); | |
}else if( item instanceof TootAccount ){ | |
showFollow( (TootAccount) item ); | |
}else if( item instanceof TootNotification ){ | |
TootNotification n = this.notification = (TootNotification) item; | |
if( TootNotification.TYPE_FAVOURITE.equals( n.type ) ){ | |
showBoost( | |
n.account | |
, n.time_created_at | |
, access_info.isNicoru( n.account ) ? R.attr.ic_nicoru : R.attr.btn_favourite | |
, Utils.formatSpannable1( activity, R.string.display_name_favourited_by, n.account.decoded_display_name ) | |
); | |
if( n.status != null ) showStatus( activity, n.status ); | |
}else if( TootNotification.TYPE_REBLOG.equals( n.type ) ){ | |
showBoost( | |
n.account | |
, n.time_created_at | |
, R.attr.btn_boost | |
, Utils.formatSpannable1( activity, R.string.display_name_boosted_by, n.account.decoded_display_name ) | |
); | |
if( n.status != null ) showStatus( activity, n.status ); | |
}else if( TootNotification.TYPE_FOLLOW.equals( n.type ) ){ | |
showBoost( | |
n.account | |
, n.time_created_at | |
, R.attr.ic_follow_plus | |
, Utils.formatSpannable1( activity, R.string.display_name_followed_by, n.account.decoded_display_name ) | |
); | |
// | |
showFollow( n.account ); | |
}else if( TootNotification.TYPE_MENTION.equals( n.type ) ){ | |
if( ! bSimpleList ){ | |
showBoost( | |
n.account | |
, n.time_created_at | |
, R.attr.btn_reply | |
, Utils.formatSpannable1( activity, R.string.display_name_replied_by, n.account.decoded_display_name ) | |
); | |
} | |
if( n.status != null ) showStatus( activity, n.status ); | |
} | |
}else if( item instanceof TootStatus ){ | |
TootStatus status = (TootStatus) item; | |
if( status.reblog != null ){ | |
if( status.account != null ){ | |
showBoost( | |
status.account | |
, status.time_created_at | |
, R.attr.btn_boost | |
, Utils.formatSpannable1( activity, R.string.display_name_boosted_by, status.account.decoded_display_name ) | |
); | |
} | |
showStatus( activity, status.reblog ); | |
}else{ | |
showStatus( activity, status ); | |
} | |
}else if( item instanceof TootGap ){ | |
showGap( (TootGap) item ); | |
}else if( item instanceof TootDomainBlock ){ | |
showDomainBlock( (TootDomainBlock) item ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment