Private
Public Access
Fix profile save UX: close modal on success, refresh room members live
Saving a display name previously gave no feedback and left the modal open, and an open room's message list/member panel kept showing the pre-edit profile until reload -- both fetch that data from a member list ChatShellPage only fetched once per room. Now the save closes the modal (clear confirmation it worked) and ChatShellPage re-fetches room members whenever the logged-in user's own display_name/avatar_filename changes, so the update appears immediately everywhere without a reload.
This commit is contained in:
@@ -28,9 +28,9 @@ export function ProfileModal({ onClose }: ProfileModalProps) {
|
||||
try {
|
||||
const updated = await updateProfile(displayName.trim() || null)
|
||||
updateUser(updated)
|
||||
onClose()
|
||||
} catch (err) {
|
||||
setError(err instanceof ApiError ? err.message : String(err))
|
||||
} finally {
|
||||
setSavingName(false)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user