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,
onPageChanged: (index) async {
await MemoriesService.instance.markMemoryAsSeen(widget.memories[index]);
setState(() {
_index = index;
});
if (mounted) {
setState(() {
_index = index;
});
}
},
physics: _shouldDisableScroll
? const NeverScrollableScrollPhysics()

View file

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

View file

@ -78,7 +78,9 @@ class _VideoWidgetState extends State<VideoWidget> {
.getFileSize(widget.file.uploadedFileID)
.then((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),
child: Column(
children: [
const SizedBox(height: 8),
ClipRRect(
borderRadius: BorderRadius.circular(8),
child: Container(