diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index 055b781d..d3b74765 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -259,12 +259,14 @@ class CwtchNotifier { case "UpdatedProfileAttribute": if (data["Key"] == "public.profile.name") { profileCN.getProfile(data["ProfileOnion"])?.nickname = data["Data"]; - } else if (data["Key"].toString().startsWith("local.filesharing.") && data["Key"].toString().endsWith(".path")) { - // local.conversation.filekey.path - List keyparts = data["Key"].toString().split("."); - if (keyparts.length == 5) { - String filekey = keyparts[2] + "." + keyparts[3]; - profileCN.getProfile(data["ProfileOnion"])?.downloadSetPathForSender(filekey, data["Data"]); + } else if (data["Key"].toString().startsWith("local.filesharing.")) { + if (data["Key"].toString().endsWith(".path")) { + // local.conversation.filekey.path + List keyparts = data["Key"].toString().split("."); + if (keyparts.length == 5) { + String filekey = keyparts[2] + "." + keyparts[3]; + profileCN.getProfile(data["ProfileOnion"])?.downloadSetPathForSender(filekey, data["Data"]); + } } } else { EnvironmentConfig.debugLog("unhandled set attribute event: ${data['Key']}"); diff --git a/lib/views/addeditprofileview.dart b/lib/views/addeditprofileview.dart index 0670058a..68a1f530 100644 --- a/lib/views/addeditprofileview.dart +++ b/lib/views/addeditprofileview.dart @@ -94,7 +94,8 @@ class _AddEditProfileViewState extends State { cursor: Provider.of(context).isExperimentEnabled(ImagePreviewsExperiment) ? SystemMouseCursors.click : SystemMouseCursors.basic, child: GestureDetector( // don't allow setting of profile images if the image previews experiment is disabled. - onTap: Provider.of(context, listen: false).disableFilePicker || !Provider.of(context, listen: false).isExperimentEnabled(ImagePreviewsExperiment) + onTap: Provider.of(context, listen: false).disableFilePicker || + !Provider.of(context, listen: false).isExperimentEnabled(ImagePreviewsExperiment) ? null : () { filesharing.showFilePicker(context, MaxImageFileSharingSize, (File file) { diff --git a/test/profileimage_init.png b/test/profileimage_init.png index 7f1a1602..2a015e0f 100644 Binary files a/test/profileimage_init.png and b/test/profileimage_init.png differ