From 1db6b4793f5e73b439ca7a5863a49c221a5aaf8e Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 15 May 2023 13:25:21 -0400 Subject: [PATCH] Adds NIP-94 shareable link to filestr --- .../vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt index 8cd9c51af..02369406b 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteQuickActionMenu.kt @@ -63,6 +63,7 @@ import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.model.AddressableNote import com.vitorpamplona.amethyst.model.Note import com.vitorpamplona.amethyst.service.model.AudioTrackEvent +import com.vitorpamplona.amethyst.service.model.FileHeaderEvent import com.vitorpamplona.amethyst.service.model.PeopleListEvent import com.vitorpamplona.amethyst.ui.components.SelectTextDialog import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel @@ -91,7 +92,11 @@ val externalLinkForNote = { note: Note -> "https://habla.news/a/${note.address()?.toNAddr()}" } } else { - "https://snort.social/e/${note.toNEvent()}" + if (note.event is FileHeaderEvent) { + "https://filestr.vercel.app/e/${note.toNEvent()}" + } else { + "https://snort.social/e/${note.toNEvent()}" + } } }