fix issue with featured search result crash
This commit is contained in:
parent
c4a1ed801a
commit
0a2769859a
2 changed files with 4 additions and 2 deletions
|
@ -308,7 +308,8 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
|
|||
|
||||
Claim original = items.get(position);
|
||||
boolean isRepost = Claim.TYPE_REPOST.equalsIgnoreCase(original.getValueType());
|
||||
final Claim item = Claim.TYPE_REPOST.equalsIgnoreCase(original.getValueType()) ? original.getRepostedClaim() : original;
|
||||
final Claim item = Claim.TYPE_REPOST.equalsIgnoreCase(original.getValueType()) ?
|
||||
(original.getRepostedClaim() != null ? original.getRepostedClaim() : original): original;
|
||||
Claim.GenericMetadata metadata = item.getValue();
|
||||
Claim signingChannel = item.getSigningChannel();
|
||||
Claim.StreamMetadata streamMetadata = null;
|
||||
|
@ -383,7 +384,7 @@ public class ClaimListAdapter extends RecyclerView.Adapter<ClaimListAdapter.View
|
|||
|
||||
vh.publishTimeView.setVisibility(!isPending ? View.VISIBLE : View.GONE);
|
||||
vh.pendingTextView.setVisibility(isPending ? View.VISIBLE : View.GONE);
|
||||
vh.repostInfoView.setVisibility(isRepost ? View.VISIBLE : View.GONE);
|
||||
vh.repostInfoView.setVisibility(isRepost && type != VIEW_TYPE_FEATURED ? View.VISIBLE : View.GONE);
|
||||
vh.repostChannelView.setText(isRepost ? original.getSigningChannel().getName() : null);
|
||||
vh.repostChannelView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -201,6 +201,7 @@ public class SearchFragment extends BaseFragment implements
|
|||
unresolved.setPermanentUrl(resolved.getPermanentUrl());
|
||||
unresolved.setValue(resolved.getValue());
|
||||
unresolved.setSigningChannel(resolved.getSigningChannel());
|
||||
unresolved.setRepostedClaim(resolved.getRepostedClaim());
|
||||
unresolved.setUnresolved(false);
|
||||
unresolved.setConfirmations(resolved.getConfirmations());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue