From 79b627684661033a70cc7cd3ef48c23c401eb99d Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Wed, 27 Jan 2021 10:07:21 +0900 Subject: [PATCH] fixed media store monitoring delay to avoid temp entries --- lib/theme/durations.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/theme/durations.dart b/lib/theme/durations.dart index 51fa3a18f..9cc883fda 100644 --- a/lib/theme/durations.dart +++ b/lib/theme/durations.dart @@ -48,5 +48,11 @@ class Durations { static const doubleBackTimerDelay = Duration(milliseconds: 1000); static const softKeyboardDisplayDelay = Duration(milliseconds: 300); static const searchDebounceDelay = Duration(milliseconds: 250); - static const contentChangeDebounceDelay = Duration(milliseconds: 1000); + + // Content change monitoring delay should be large enough, + // so that querying the Media Store yields final entries. + // For example, when taking a picture with a Galaxy S10e default camera app, + // querying the Media Store just 1 second after sometimes yields an entry with + // its temporary path: `/data/sec/camera/!@#$%^..._temp.jpg` + static const contentChangeDebounceDelay = Duration(milliseconds: 1500); }