Fixup Context Listen

pull/355/head
Sarah Jamie Lewis 8 months ago
parent 403454d6b8
commit bf4cfde7df
  1. 4
      lib/views/addeditprofileview.dart

@ -91,10 +91,10 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
visible: Provider.of<ProfileInfoState>(context).onion.isNotEmpty,
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
MouseRegion(
cursor: Provider.of<Settings>(context, listen: false).isExperimentEnabled(ImagePreviewsExperiment) ? SystemMouseCursors.click : SystemMouseCursors.basic,
cursor: Provider.of<Settings>(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<AppState>(context).disableFilePicker || !Provider.of<Settings>(context, listen: false).isExperimentEnabled(ImagePreviewsExperiment)
onTap: Provider.of<AppState>(context, listen: false).disableFilePicker || !Provider.of<Settings>(context, listen: false).isExperimentEnabled(ImagePreviewsExperiment)
? null
: () {
filesharing.showFilePicker(context, MaxImageFileSharingSize, (File file) {

Loading…
Cancel
Save