diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DropDownMenu.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DropDownMenu.kt
index 242bf2f46..574b56771 100644
--- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DropDownMenu.kt
+++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/elements/DropDownMenu.kt
@@ -232,14 +232,20 @@ fun NoteDropDownMenu(
nav.nav { routeEditDraftTo(note, accountViewModel.account) }
}
}
- if (note.event is TextNoteEvent && !note.isDraft()) {
- if (state.isLoggedUser) {
- M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.edit_post)) {
- wantsToEditPost.value = true
+ if (!note.isDraft()) {
+ if (note.event is TextNoteEvent) {
+ if (state.isLoggedUser) {
+ M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.edit_post)) {
+ wantsToEditPost.value = true
+ }
+ } else {
+ M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.propose_an_edit)) {
+ wantsToEditPost.value = true
+ }
}
- } else {
- M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.propose_an_edit)) {
- wantsToEditPost.value = true
+ } else if (note.event is LongTextNoteEvent && state.isLoggedUser) {
+ M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.edit_article)) {
+ nav.nav { Route.NewLongFormPost(version = note.idHex) }
}
}
}
diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/bookmarkgroups/display/BookmarkGroupItemOptions.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/bookmarkgroups/display/BookmarkGroupItemOptions.kt
index 717499410..73febbbf7 100644
--- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/bookmarkgroups/display/BookmarkGroupItemOptions.kt
+++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/bookmarkgroups/display/BookmarkGroupItemOptions.kt
@@ -55,6 +55,7 @@ import com.vitorpamplona.amethyst.ui.components.M3ActionDialog
import com.vitorpamplona.amethyst.ui.components.M3ActionRow
import com.vitorpamplona.amethyst.ui.components.M3ActionSection
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
+import com.vitorpamplona.amethyst.ui.navigation.routes.Route
import com.vitorpamplona.amethyst.ui.navigation.routes.routeEditDraftTo
import com.vitorpamplona.amethyst.ui.note.VerticalDotsIcon
import com.vitorpamplona.amethyst.ui.note.elements.DropDownParams
@@ -66,6 +67,7 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.report.ReportNoteDialog
import com.vitorpamplona.amethyst.ui.stringRes
import com.vitorpamplona.amethyst.ui.theme.Size24Modifier
import com.vitorpamplona.quartz.nip10Notes.TextNoteEvent
+import com.vitorpamplona.quartz.nip23LongContent.LongTextNoteEvent
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@@ -248,14 +250,20 @@ fun BookmarkGroupItemOptionsMenu(
}
}
}
- if (note.event is TextNoteEvent && !note.isDraft()) {
- if (state.isLoggedUser) {
- M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.edit_post)) {
- wantsToEditPost.value = true
+ if (!note.isDraft()) {
+ if (note.event is TextNoteEvent) {
+ if (state.isLoggedUser) {
+ M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.edit_post)) {
+ wantsToEditPost.value = true
+ }
+ } else {
+ M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.propose_an_edit)) {
+ wantsToEditPost.value = true
+ }
}
- } else {
- M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.propose_an_edit)) {
- wantsToEditPost.value = true
+ } else if (note.event is LongTextNoteEvent && state.isLoggedUser) {
+ M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.edit_article)) {
+ nav.nav { Route.NewLongFormPost(version = note.idHex) }
}
}
}
diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml
index 4e1c1d20e..bf05100bf 100644
--- a/amethyst/src/main/res/values/strings.xml
+++ b/amethyst/src/main/res/values/strings.xml
@@ -1467,6 +1467,7 @@
Timestamp Proof
There\'s proof this post was signed sometime before %1$s. The proof was stamped in the Bitcoin blockchain at that date and time.
+ Edit Article
Edit Post
Proposal to improve a post
Summary of changes