Fix for UI bug on memory widget. (#1062)

This commit is contained in:
Neeraj Gupta 2023-05-04 12:49:23 +05:30 committed by GitHub
commit c004663be0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 29 deletions

View file

@ -48,7 +48,10 @@ class MemoriesWidget extends StatelessWidget {
}
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(children: memoryWidgets),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: memoryWidgets,
),
);
}
@ -106,27 +109,32 @@ class _MemoryWidgetState extends State<MemoryWidget> {
);
setState(() {});
},
child: Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
_buildMemoryItem(context, index),
const Padding(padding: EdgeInsets.all(4)),
Hero(
tag: title,
child: Material(
type: MaterialType.transparency,
child: Text(
title,
style: getEnteTextTheme(context).mini,
textAlign: TextAlign.center,
child: Row(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
_buildMemoryItem(context, index),
const Padding(padding: EdgeInsets.all(4)),
Hero(
tag: title,
child: Material(
type: MaterialType.transparency,
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 84),
child: Text(
title,
style: getEnteTextTheme(context).mini,
textAlign: TextAlign.center,
),
),
),
),
),
],
],
),
),
),
],
),
);
}

View file

@ -91,13 +91,11 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
: const SyncStatusWidget()
: const Text("ente", style: brandStyleMedium),
),
AnimatedOpacity(
opacity: _showErrorBanner ? 1 : 0,
duration: const Duration(milliseconds: 200),
child: const Divider(
height: 8,
),
),
_showErrorBanner
? const Divider(
height: 8,
)
: const SizedBox.shrink(),
_showErrorBanner
? HeaderErrorWidget(error: _syncError)
: const SizedBox.shrink(),

View file

@ -279,7 +279,9 @@ class _ZoomableImageState extends State<ZoomableImage>
(h != widget.photo.height || w != widget.photo.width)) {
_logger.info('Updating aspect ratio for ${widget.photo} to $h:$w');
await FileMagicService.instance.updatePublicMagicMetadata(
[widget.photo], {publicMagicKeyHeight: h, publicMagicKeyWidth: w});
[widget.photo],
{publicMagicKeyHeight: h, publicMagicKeyWidth: w},
);
}
}
}

View file

@ -325,8 +325,11 @@ class CryptoUtil {
args["destinationFilePath"] = destinationFilePath;
args["header"] = header;
args["key"] = key;
return _computer.compute(chachaDecryptFile,
param: args, taskName: "decryptFile");
return _computer.compute(
chachaDecryptFile,
param: args,
taskName: "decryptFile",
);
}
// Generates and returns a 256-bit key.