@ -98,7 +98,7 @@ class StatusViewHolder extends RecyclerView.ViewHolder {
displayName . setText ( name ) ;
displayName . setText ( name ) ;
}
}
void setUsername ( String name ) {
private void setUsername ( String name ) {
Context context = username . getContext ( ) ;
Context context = username . getContext ( ) ;
String format = context . getString ( R . string . status_username_format ) ;
String format = context . getString ( R . string . status_username_format ) ;
String usernameText = String . format ( format , name ) ;
String usernameText = String . format ( format , name ) ;
@ -139,7 +139,7 @@ class StatusViewHolder extends RecyclerView.ViewHolder {
ClickableSpan newSpan = new ClickableSpan ( ) {
ClickableSpan newSpan = new ClickableSpan ( ) {
@Override
@Override
public void onClick ( View widget ) {
public void onClick ( View widget ) {
listener . onViewAccount ( accountId , accountUsername ) ;
listener . onViewAccount ( accountId ) ;
}
}
} ;
} ;
builder . removeSpan ( span ) ;
builder . removeSpan ( span ) ;
@ -294,35 +294,35 @@ class StatusViewHolder extends RecyclerView.ViewHolder {
content . setVisibility ( View . VISIBLE ) ;
content . setVisibility ( View . VISIBLE ) ;
}
}
private void setupButtons ( final StatusActionListener listener , final int position ) {
private void setupButtons ( final StatusActionListener listener , final String accountId ) {
avatar . setOnClickListener ( new View . OnClickListener ( ) {
avatar . setOnClickListener ( new View . OnClickListener ( ) {
@Override
@Override
public void onClick ( View v ) {
public void onClick ( View v ) {
listener . onViewAccount ( position ) ;
listener . onViewAccount ( accountId ) ;
}
}
} ) ;
} ) ;
replyButton . setOnClickListener ( new View . OnClickListener ( ) {
replyButton . setOnClickListener ( new View . OnClickListener ( ) {
@Override
@Override
public void onClick ( View v ) {
public void onClick ( View v ) {
listener . onReply ( position ) ;
listener . onReply ( getAda pterP osition( ) ) ;
}
}
} ) ;
} ) ;
reblogButton . setOnClickListener ( new View . OnClickListener ( ) {
reblogButton . setOnClickListener ( new View . OnClickListener ( ) {
@Override
@Override
public void onClick ( View v ) {
public void onClick ( View v ) {
listener . onReblog ( ! reblogged , position ) ;
listener . onReblog ( ! reblogged , getAda pterP osition( ) ) ;
}
}
} ) ;
} ) ;
favouriteButton . setOnClickListener ( new View . OnClickListener ( ) {
favouriteButton . setOnClickListener ( new View . OnClickListener ( ) {
@Override
@Override
public void onClick ( View v ) {
public void onClick ( View v ) {
listener . onFavourite ( ! favourited , position ) ;
listener . onFavourite ( ! favourited , getAda pterP osition( ) ) ;
}
}
} ) ;
} ) ;
moreButton . setOnClickListener ( new View . OnClickListener ( ) {
moreButton . setOnClickListener ( new View . OnClickListener ( ) {
@Override
@Override
public void onClick ( View v ) {
public void onClick ( View v ) {
listener . onMore ( v , position ) ;
listener . onMore ( v , getAda pterP osition( ) ) ;
}
}
} ) ;
} ) ;
/ * Even though the content TextView is a child of the container , it won ' t respond to clicks
/ * Even though the content TextView is a child of the container , it won ' t respond to clicks
@ -332,7 +332,7 @@ class StatusViewHolder extends RecyclerView.ViewHolder {
View . OnClickListener viewThreadListener = new View . OnClickListener ( ) {
View . OnClickListener viewThreadListener = new View . OnClickListener ( ) {
@Override
@Override
public void onClick ( View v ) {
public void onClick ( View v ) {
listener . onViewThread ( position ) ;
listener . onViewThread ( getAda pterP osition( ) ) ;
}
}
} ;
} ;
content . setOnClickListener ( viewThreadListener ) ;
content . setOnClickListener ( viewThreadListener ) ;
@ -361,7 +361,7 @@ class StatusViewHolder extends RecyclerView.ViewHolder {
if ( ! sensitive | | attachments . length = = 0 ) {
if ( ! sensitive | | attachments . length = = 0 ) {
hideSensitiveMediaWarning ( ) ;
hideSensitiveMediaWarning ( ) ;
}
}
setupButtons ( listener , position ) ;
setupButtons ( listener , status . getAccountId ( ) ) ;
setRebloggingEnabled ( status . getVisibility ( ) ! = Status . Visibility . PRIVATE ) ;
setRebloggingEnabled ( status . getVisibility ( ) ! = Status . Visibility . PRIVATE ) ;
if ( status . getSpoilerText ( ) . isEmpty ( ) ) {
if ( status . getSpoilerText ( ) . isEmpty ( ) ) {
hideSpoilerText ( ) ;
hideSpoilerText ( ) ;