mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 11:17:27 +01:00
Update addFollowSet() method to optionally create a list with first member.
This commit is contained in:
@@ -118,6 +118,7 @@ class NostrUserListFeedViewModel(
|
||||
setName: String,
|
||||
setDescription: String?,
|
||||
isListPrivate: Boolean,
|
||||
optionalFirstMemberHex: String? = null,
|
||||
account: Account,
|
||||
) {
|
||||
if (!account.settings.isWriteable()) {
|
||||
@@ -129,6 +130,7 @@ class NostrUserListFeedViewModel(
|
||||
title = setName,
|
||||
description = setDescription,
|
||||
isPrivate = isListPrivate,
|
||||
firstMemberHex = optionalFirstMemberHex,
|
||||
signer = account.signer,
|
||||
) {
|
||||
account.sendMyPublicAndPrivateOutbox(it)
|
||||
|
||||
@@ -219,6 +219,7 @@ class PeopleListEvent(
|
||||
title: String,
|
||||
description: String? = null,
|
||||
isPrivate: Boolean,
|
||||
firstMemberHex: String? = null,
|
||||
signer: NostrSigner,
|
||||
createdAt: Long = TimeUtils.now(),
|
||||
onReady: (PeopleListEvent) -> Unit,
|
||||
@@ -227,7 +228,7 @@ class PeopleListEvent(
|
||||
val newList =
|
||||
create(
|
||||
name = title,
|
||||
person = UserTag(pubKey = signer.pubKey),
|
||||
person = UserTag(pubKey = firstMemberHex ?: signer.pubKey),
|
||||
isPrivate = isPrivate,
|
||||
signer = signer,
|
||||
dTag = dTag,
|
||||
@@ -239,7 +240,7 @@ class PeopleListEvent(
|
||||
val event =
|
||||
build(
|
||||
name = title,
|
||||
privatePeople = listOf(UserTag(pubKey = signer.pubKey)),
|
||||
privatePeople = listOf(UserTag(pubKey = firstMemberHex ?: signer.pubKey)),
|
||||
signer = signer,
|
||||
dTag = dTag,
|
||||
createdAt = createdAt,
|
||||
@@ -252,7 +253,7 @@ class PeopleListEvent(
|
||||
val event =
|
||||
build(
|
||||
name = title,
|
||||
publicPeople = listOf(UserTag(pubKey = signer.pubKey)),
|
||||
publicPeople = listOf(UserTag(pubKey = firstMemberHex ?: signer.pubKey)),
|
||||
signer = signer,
|
||||
dTag = dTag,
|
||||
createdAt = createdAt,
|
||||
|
||||
Reference in New Issue
Block a user