mirror of
https://github.com/BlowaterNostr/blowater.git
synced 2024-10-18 15:43:20 +00:00
fix EditGroup (#225)
This commit is contained in:
parent
ea4199d05b
commit
65186eee5f
@ -365,7 +365,7 @@ export async function* UI_Interaction_Update(args: {
|
||||
<EditGroup
|
||||
emit={eventBus.emit}
|
||||
publicKey={event.publicKey}
|
||||
conversationLists={app.conversationLists}
|
||||
profileGetter={app.database}
|
||||
/>
|
||||
),
|
||||
});
|
||||
|
@ -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<EditGroupChatProfile>;
|
||||
publicKey: PublicKey;
|
||||
conversationLists: ConversationLists;
|
||||
profileGetter: ProfileGetter;
|
||||
};
|
||||
|
||||
type State = {
|
||||
@ -54,6 +54,15 @@ export class EditGroup extends Component<Props, State> {
|
||||
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,
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit a8a21694c7f0052af9549485033a8e07d60a786f
|
||||
Subproject commit 23c6b0b2a6480cf2234041e48d2b4f882cb67903
|
Loading…
Reference in New Issue
Block a user