1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-22 21:16:57 +00:00

fix Add to favorites button's visibility - issue #1047

This commit is contained in:
stamatiap 2021-04-27 12:49:08 +03:00
parent 1cd75f2462
commit a5759b6c1b

View File

@ -693,6 +693,8 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe
fetchStoryAndHighlights(profileId);
}
setupButtons(profileId);
final boolean isNotMe = profileModel != null && !Objects.equals(profileId, myId);
profileDetailsBinding.favChip.setVisibility(isNotMe ? View.VISIBLE : View.GONE);
profileDetailsBinding.favChip.setVisibility(View.VISIBLE);
final FavoriteRepository favoriteRepository = FavoriteRepository.getInstance(FavoriteDataSource.getInstance(getContext()));
favoriteRepository.getFavorite(profileModel.getUsername(), FavoriteType.USER, new RepositoryCallback<Favorite>() {