1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-26 08:37:29 +00:00

oops, better handling

This commit is contained in:
Austin Huang 2021-02-18 19:57:38 -05:00
parent bbe3d9c588
commit d10e95c529
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F

View File

@ -115,7 +115,13 @@ public abstract class FeedItemViewHolder extends RecyclerView.ViewHolder {
private void setupLocation(@NonNull final Media media) {
final Location location = media.getLocation();
if (location != null) {
if (location == null) {
topBinding.location.setVisibility(View.GONE);
topBinding.title.setLayoutParams(new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT
));
}
else {
final String locationName = location.getName();
if (TextUtils.isEmpty(locationName)) {
topBinding.location.setVisibility(View.GONE);