Search in sources :

Example 1 with SolidIconView

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);
        }
    }
}
Also used : AttributeProviderContext(org.commonmark.renderer.html.AttributeProviderContext) Context(android.content.Context) SolidIconView(com.odysee.app.ui.controls.SolidIconView) PlayerView(com.google.android.exoplayer2.ui.PlayerView) NestedScrollView(androidx.core.widget.NestedScrollView) AdapterView(android.widget.AdapterView) RecyclerView(androidx.recyclerview.widget.RecyclerView) PhotoView(com.github.chrisbanes.photoview.PhotoView) ImageView(android.widget.ImageView) View(android.view.View) WebView(android.webkit.WebView) TextView(android.widget.TextView) Claim(com.odysee.app.model.Claim) SolidIconView(com.odysee.app.ui.controls.SolidIconView)

Aggregations

Context (android.content.Context)1 View (android.view.View)1 WebView (android.webkit.WebView)1 AdapterView (android.widget.AdapterView)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 NestedScrollView (androidx.core.widget.NestedScrollView)1 RecyclerView (androidx.recyclerview.widget.RecyclerView)1 PhotoView (com.github.chrisbanes.photoview.PhotoView)1 PlayerView (com.google.android.exoplayer2.ui.PlayerView)1 Claim (com.odysee.app.model.Claim)1 SolidIconView (com.odysee.app.ui.controls.SolidIconView)1 AttributeProviderContext (org.commonmark.renderer.html.AttributeProviderContext)1