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:
2026-08-14 17:09:22 -06:00
parent 8ca3e2e23d
commit ad1beccd3a
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -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)
}
}