fix: disable slug field when editing an existing article

The d-tag is the article's identity in Nostr addressable events.
Changing it on edit would create a new article instead of updating
the existing one. The slug field is now disabled when isEditing is true.

https://claude.ai/code/session_011JuQbdA12WdPxC7aGvUBqJ
This commit is contained in:
Claude
2026-04-02 14:50:51 +00:00
parent 10bcbdcd8c
commit eb19fc69ae
2 changed files with 3 additions and 0 deletions
@@ -324,6 +324,7 @@ private fun MarkdownPostScreenBody(
.fillMaxWidth()
.padding(horizontal = Size10dp, vertical = Size5dp),
singleLine = true,
enabled = !postViewModel.isEditing,
)
// Tags section
@@ -207,6 +207,8 @@ class LongFormPostViewModel :
// Editing existing article
var existingDTag: String? = null
val isEditing: Boolean get() = existingDTag != null
fun init(accountVM: AccountViewModel) {
this.accountViewModel = accountVM
this.account = accountVM.account