Skip to content

Commit

Permalink
Fixes bug when creating bookmarks for the first time.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorpamplona committed Jan 11, 2024
1 parent f1e721f commit 422446f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class BookmarkListEvent(
companion object {
const val KIND = 30001
const val ALT = "List of bookmarks"
const val DEFAULT_D_TAG_BOOKMARKS = "bookmark"

fun addEvent(
earlierVersion: BookmarkListEvent?,
Expand Down Expand Up @@ -107,7 +108,7 @@ class BookmarkListEvent(
) { encryptedTags ->
create(
content = encryptedTags,
tags = emptyArray(),
tags = arrayOf(arrayOf("d", DEFAULT_D_TAG_BOOKMARKS)),
signer = signer,
createdAt = createdAt,
onReady = onReady,
Expand All @@ -117,7 +118,7 @@ class BookmarkListEvent(
} else {
create(
content = earlierVersion?.content ?: "",
tags = (earlierVersion?.tags ?: emptyArray()).plus(listNewTags),
tags = (earlierVersion?.tags ?: arrayOf(arrayOf("d", DEFAULT_D_TAG_BOOKMARKS))).plus(listNewTags),
signer = signer,
createdAt = createdAt,
onReady = onReady,
Expand Down

0 comments on commit 422446f

Please sign in to comment.