Skip to content

Commit 2535774

Browse files
committed
Remove unused factory
1 parent 7695373 commit 2535774

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

samplejava/src/main/java/com/example/chattutorial/ImgurAttachmentViewFactory.java

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import io.getstream.chat.android.ui.message.list.adapter.viewholder.attachment.AttachmentViewFactory;
2020
import io.getstream.chat.android.ui.message.list.internal.MessageListItemStyle;
2121

22-
class ImgurAttachmentViewFactory extends AttachmentViewFactory {
22+
public class ImgurAttachmentViewFactory extends AttachmentViewFactory {
2323

2424
@NotNull
2525
@Override
@@ -68,31 +68,3 @@ private View createImgurAttachmentView(Attachment imgurAttachment, ViewGroup par
6868
}
6969
}
7070

71-
72-
class MyAttachmentViewFactory extends AttachmentViewFactory {
73-
74-
private static final String MY_URL_ADDRESS = "https://myurl.com";
75-
76-
@NotNull
77-
@Override
78-
public View createAttachmentView(
79-
@NotNull MessageListItem.MessageItem data,
80-
@NotNull MessageListListenerContainer listeners,
81-
@NotNull MessageListItemStyle style,
82-
@NotNull View parent
83-
) {
84-
boolean containsMyAttachments = false;
85-
for (Attachment attachment: data.getMessage().getAttachments()) {
86-
if (attachment.getImageUrl().contains(MY_URL_ADDRESS)) {
87-
containsMyAttachments = true;
88-
}
89-
}
90-
91-
if (containsMyAttachments) {
92-
// put your custom attachment view creation here
93-
return new View(parent.getContext());
94-
} else {
95-
return super.createAttachmentView(data, listeners, style, parent);
96-
}
97-
}
98-
}

0 commit comments

Comments
 (0)