use of com.odysee.app.ui.controls.SolidIconView in project odysee-android by OdyseeTeam.
the class FileViewFragment method checkIsFollowing.
private void checkIsFollowing() {
Claim actualClaim = collectionClaimItem != null ? collectionClaimItem : fileClaim;
if (actualClaim != null && actualClaim.getSigningChannel() != null) {
boolean isFollowing = Lbryio.isFollowing(actualClaim.getSigningChannel());
boolean notificationsDisabled = Lbryio.isNotificationsDisabled(actualClaim.getSigningChannel());
Context context = getContext();
View root = getView();
if (context != null && root != null) {
View iconFollow = root.findViewById(R.id.file_view_icon_follow);
SolidIconView iconUnfollow = root.findViewById(R.id.file_view_icon_unfollow);
SolidIconView iconBell = root.findViewById(R.id.file_view_icon_bell);
Helper.setViewVisibility(iconFollow, !isFollowing ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(iconUnfollow, isFollowing ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(iconBell, isFollowing ? View.VISIBLE : View.GONE);
iconBell.setText(notificationsDisabled ? R.string.fa_bell : R.string.fa_bell_slash);
}
}
}
Aggregations