Skip to content

Commit 4356098

Browse files
authored
[android] call endOfStream on ui thread (#589)
1 parent d20da3b commit 4356098

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/OfflineController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class OfflineController(
4040
{ expected ->
4141
mainHandler.post {
4242
callback(expected.toResult { it.toFLTStylePack() })
43+
progressHandlers.remove(styleURI)?.endOfStream()
4344
}
44-
progressHandlers.remove(styleURI)?.endOfStream()
4545
}
4646
)
4747
}

android/src/main/kotlin/com/mapbox/maps/mapbox_maps/offline/TileStoreController.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class TileStoreController(
4747
{ expected ->
4848
mainHandler.post {
4949
callback(expected.toResult { it.toFLTTileRegion() })
50+
tileRegionLoadProgressHandlers.remove(id)?.endOfStream()
5051
}
51-
tileRegionLoadProgressHandlers.remove(id)?.endOfStream()
5252
}
5353
)
5454
}
@@ -87,8 +87,8 @@ class TileStoreController(
8787
{ expected ->
8888
mainHandler.post {
8989
callback(expected.toResult { it.toFLTTileRegionEstimateResult() })
90+
tileRegionEstimateProgressHandlers.remove(id)?.endOfStream()
9091
}
91-
tileRegionEstimateProgressHandlers.remove(id)?.endOfStream()
9292
}
9393
)
9494
}

0 commit comments

Comments
 (0)