diff --git a/UI/app_update.tsx b/UI/app_update.tsx index 7ab20c6..507315b 100644 --- a/UI/app_update.tsx +++ b/UI/app_update.tsx @@ -365,7 +365,7 @@ export async function* UI_Interaction_Update(args: { ), }); diff --git a/UI/edit-group.tsx b/UI/edit-group.tsx index e97f618..2d457b3 100644 --- a/UI/edit-group.tsx +++ b/UI/edit-group.tsx @@ -8,8 +8,8 @@ import { ButtonClass, InputClass, LinearGradientsClass } from "./components/tw.t import { Avatar } from "./components/avatar.tsx"; import { ProfileData } from "../features/profile.ts"; import { emitFunc } from "../event-bus.ts"; -import { PrivateKey, PublicKey } from "../lib/nostr-ts/key.ts"; -import { ConversationLists } from "./conversation-list.ts"; +import { PublicKey } from "../lib/nostr-ts/key.ts"; +import { ProfileGetter } from "./search.tsx"; export type StartEditGroupChatProfile = { type: "StartEditGroupChatProfile"; @@ -25,7 +25,7 @@ export type EditGroupChatProfile = { type Props = { emit: emitFunc; publicKey: PublicKey; - conversationLists: ConversationLists; + profileGetter: ProfileGetter; }; type State = { @@ -54,6 +54,15 @@ export class EditGroup extends Component { tw`w-full mt-4 ${ButtonClass} ${LinearGradientsClass} hover:bg-gradient-to-l disabled:opacity-50`, }; + componentDidMount() { + const profile = this.props.profileGetter.getProfilesByPublicKey(this.props.publicKey); + + this.setState({ + name: profile?.profile.name || "", + picture: profile?.profile.picture || "", + }); + } + onNameInput = (name: string) => { this.setState({ name: name, diff --git a/lib/nostr-ts b/lib/nostr-ts index a8a2169..23c6b0b 160000 --- a/lib/nostr-ts +++ b/lib/nostr-ts @@ -1 +1 @@ -Subproject commit a8a21694c7f0052af9549485033a8e07d60a786f +Subproject commit 23c6b0b2a6480cf2234041e48d2b4f882cb67903