Merge pull request #592 from ente-io/minor-fixes

Minor fixes
This commit is contained in:
Neeraj Gupta 2022-10-21 13:40:23 +05:30 committed by GitHub
commit 470000ce7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 8 deletions

View file

@ -410,9 +410,11 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {
extents: 1, extents: 1,
onPageChanged: (index) async { onPageChanged: (index) async {
await MemoriesService.instance.markMemoryAsSeen(widget.memories[index]); await MemoriesService.instance.markMemoryAsSeen(widget.memories[index]);
setState(() { if (mounted) {
_index = index; setState(() {
}); _index = index;
});
}
}, },
physics: _shouldDisableScroll physics: _shouldDisableScroll
? const NeverScrollableScrollPhysics() ? const NeverScrollableScrollPhysics()

View file

@ -51,9 +51,11 @@ class _FileInfoWidgetState extends State<FileInfoWidget> {
widget.file.fileType == FileType.livePhoto; widget.file.fileType == FileType.livePhoto;
if (_isImage) { if (_isImage) {
getExif(widget.file).then((exif) { getExif(widget.file).then((exif) {
setState(() { if (mounted) {
_exif = exif; setState(() {
}); _exif = exif;
});
}
}); });
} }
super.initState(); super.initState();

View file

@ -78,7 +78,9 @@ class _VideoWidgetState extends State<VideoWidget> {
.getFileSize(widget.file.uploadedFileID) .getFileSize(widget.file.uploadedFileID)
.then((value) { .then((value) {
widget.file.fileSize = value; widget.file.fileSize = value;
setState(() {}); if (mounted) {
setState(() {});
}
}); });
} }
} }

View file

@ -75,7 +75,6 @@ class _SearchWidgetState extends State<SearchWidget> {
padding: const EdgeInsets.symmetric(horizontal: 4), padding: const EdgeInsets.symmetric(horizontal: 4),
child: Column( child: Column(
children: [ children: [
const SizedBox(height: 8),
ClipRRect( ClipRRect(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
child: Container( child: Container(