Skip to content

Commit b658501

Browse files
committed
⚡ Request thumb only when request type is not audio.
1 parent 7c32912 commit b658501

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/src/provider/asset_picker_provider.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,11 @@ class AssetPickerProvider extends ChangeNotifier {
218218
for (final AssetPathEntity pathEntity in _list) {
219219
// Use sync method to avoid unnecessary wait.
220220
_pathEntityList[pathEntity] = null;
221-
getFirstThumbFromPathEntity(pathEntity).then((Uint8List data) {
222-
_pathEntityList[pathEntity] = data;
223-
});
221+
if (requestType != RequestType.audio) {
222+
getFirstThumbFromPathEntity(pathEntity).then((Uint8List data) {
223+
_pathEntityList[pathEntity] = data;
224+
});
225+
}
224226
}
225227

226228
/// Set first path entity as current path entity.

0 commit comments

Comments
 (0)