mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-07-08 05:37:53 +02:00
Wrap a few things trying to prevent UI / main thread hang we saw one time
This commit is contained in:
@@ -150,7 +150,7 @@ Future<List<OsmNode>> _fetchSingleOverpassQuery({
|
||||
return [];
|
||||
}
|
||||
|
||||
final data = jsonDecode(response.body) as Map<String, dynamic>;
|
||||
final data = await compute(jsonDecode, response.body) as Map<String, dynamic>;
|
||||
final elements = data['elements'] as List<dynamic>;
|
||||
|
||||
if (elements.length > 20) {
|
||||
|
||||
Reference in New Issue
Block a user