Skip to content

Commit

Permalink
explode stupit lifetime query params
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendicated authored Feb 3, 2024
1 parent 7cd92bc commit 43e0ee3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.aliucord.entities.Plugin
import com.aliucord.patcher.after
import com.aliucord.wrappers.messages.AttachmentWrapper.Companion.url
import com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemAttachment
import java.net.URL;

val logger = Logger("TextFilePreview")

Expand All @@ -42,7 +43,7 @@ class TextFilePreview : Plugin() {
cardView.removeView(it)
}

if (plainTextExtensions.contains(entry.attachment.url.substringAfterLast('.'))) {
if (plainTextExtensions.contains(new URL(entry.attachment.url).getPath().substringAfterLast('.'))) {
cardView.getChildAt(0).visibility = View.GONE
cardView.addView(AttachmentPreviewWidget(cardView.context, entry.attachment, settings))
cardView.setOnClickListener(null)
Expand Down

0 comments on commit 43e0ee3

Please sign in to comment.