Merge pull request #3058 from pangeachat/3049-backing-out-of-new-account-avatar-selection-causes-avatar-display-error

chore: if user cancels image selection in user settings page, don't r…
This commit is contained in:
ggurdin 2025-06-13 11:02:55 -04:00 committed by GitHub
commit 755c79457e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -135,6 +135,10 @@ class UserSettingsState extends State<UserSettingsPage> {
final bytes = await selectedFile?.readAsBytes();
final path = selectedFile?.path;
if (bytes == null || path == null) {
return;
}
setState(() {
selectedAvatarPath = null;
avatar = bytes;