Skip to content

Commit

Permalink
Update codes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin committed May 28, 2021
1 parent 1ae7b05 commit 8e735ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/mapbox/maps/MapInitOptions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ fun ResourceOptions.Builder.applyDefaultParams(

cachePath("$databaseDirectoryPath/$DATABASE_NAME")
cacheSize(DEFAULT_CACHE_SIZE) // 50 mb
}
}
4 changes: 2 additions & 2 deletions sdk/src/main/java/com/mapbox/maps/ResourceOptionsManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ data class ResourceOptionsManager(
defaultToken?.let { token ->
default?.let {
// Reuse the config from previous default and only update the token
val builder = it.resourceOptions.toBuilder().accessToken(token)
return ResourceOptionsManager(builder.build()).also { default = it }
it.update { accessToken(token) }
return it
}
// Build a new ResourceOptionsManager with the provided token.
val builder = ResourceOptions.Builder().applyDefaultParams(context).accessToken(token)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ class ResourceAttributeParserTest {
).baseURL
)
}
}
}

0 comments on commit 8e735ea

Please sign in to comment.