discord-jadx/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemAttachment$configureFileData$2.java
2021-06-27 22:44:35 +02:00

32 lines
1.8 KiB
Java

package com.discord.widgets.chat.list.adapter;
import android.net.Uri;
import android.view.View;
import android.widget.ImageView;
import com.discord.api.message.attachment.MessageAttachment;
import com.discord.widgets.chat.list.adapter.WidgetChatListAdapter;
import d0.z.d.m;
/* compiled from: WidgetChatListAdapterItemAttachment.kt */
public final class WidgetChatListAdapterItemAttachment$configureFileData$2 implements View.OnClickListener {
public final /* synthetic */ MessageAttachment $data;
public final /* synthetic */ WidgetChatListAdapterItemAttachment this$0;
public WidgetChatListAdapterItemAttachment$configureFileData$2(WidgetChatListAdapterItemAttachment widgetChatListAdapterItemAttachment, MessageAttachment messageAttachment) {
this.this$0 = widgetChatListAdapterItemAttachment;
this.$data = messageAttachment;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
WidgetChatListAdapter.EventHandler eventHandler = WidgetChatListAdapterItemAttachment.access$getAdapter$p(this.this$0).getEventHandler();
Uri parse = Uri.parse(this.$data.f());
m.checkNotNullExpressionValue(parse, "Uri.parse(data.url)");
boolean onQuickDownloadClicked = eventHandler.onQuickDownloadClicked(parse, this.$data.a());
ImageView imageView = WidgetChatListAdapterItemAttachment.access$getBinding$p(this.this$0).f;
m.checkNotNullExpressionValue(imageView, "binding.chatListItemAttachmentDownload");
imageView.setEnabled(!onQuickDownloadClicked);
ImageView imageView2 = WidgetChatListAdapterItemAttachment.access$getBinding$p(this.this$0).f;
m.checkNotNullExpressionValue(imageView2, "binding.chatListItemAttachmentDownload");
imageView2.setAlpha(0.3f);
}
}