Browse Source

remove avatar from hashtag

avatars don't exist on app api, and there's no pattern... so bye bye
renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
0f996f88ba
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 6
      app/src/main/java/awais/instagrabber/fragments/HashTagFragment.java
  2. 7
      app/src/main/java/awais/instagrabber/repositories/responses/Hashtag.java
  3. BIN
      app/src/main/res/drawable/ic_hashtag.png

6
app/src/main/java/awais/instagrabber/fragments/HashTagFragment.java

@ -474,7 +474,7 @@ public class HashTagFragment extends Fragment implements SwipeRefreshLayout.OnRe
hashtag,
FavoriteType.HASHTAG,
hashtagModel.getName(),
hashtagModel.getProfilePicUrl(),
"res:/" + R.drawable.ic_hashtag,
result.getDateAdded()
), new RepositoryCallback<Void>() {
@Override
@ -518,7 +518,7 @@ public class HashTagFragment extends Fragment implements SwipeRefreshLayout.OnRe
hashtag,
FavoriteType.HASHTAG,
hashtagModel.getName(),
hashtagModel.getProfilePicUrl(),
"res:/" + R.drawable.ic_hashtag,
new Date()
), new RepositoryCallback<Void>() {
@Override
@ -533,7 +533,7 @@ public class HashTagFragment extends Fragment implements SwipeRefreshLayout.OnRe
});
}
}));
hashtagDetailsBinding.mainHashtagImage.setImageURI(hashtagModel.getProfilePicUrl());
hashtagDetailsBinding.mainHashtagImage.setImageURI("res:/" + R.drawable.ic_hashtag);
final String postCount = String.valueOf(hashtagModel.getMediaCount());
final SpannableStringBuilder span = new SpannableStringBuilder(getResources().getQuantityString(R.plurals.main_posts_count_inline,
hashtagModel.getMediaCount() > 2000000000L

7
app/src/main/java/awais/instagrabber/repositories/responses/Hashtag.java

@ -9,16 +9,13 @@ public final class Hashtag implements Serializable {
private final long mediaCount;
private final String id;
private final String name;
private final String profilePicUrl; // on app API this is always null (property exists)
public Hashtag(final String id,
final String name,
final String profilePicUrl,
final long mediaCount,
final FollowingType following) {
this.id = id;
this.name = name;
this.profilePicUrl = profilePicUrl;
this.mediaCount = mediaCount;
this.following = following;
}
@ -31,10 +28,6 @@ public final class Hashtag implements Serializable {
return name;
}
public String getProfilePicUrl() {
return profilePicUrl;
}
public Long getMediaCount() {
return mediaCount;
}

BIN
app/src/main/res/drawable/ic_hashtag.png

After

Width: 132  |  Height: 132  |  Size: 5.5 KiB

Loading…
Cancel
Save