Small refactor
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
package be.simplenotes.app.utils
|
||||
|
||||
import kotlinx.serialization.json.*
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
|
||||
interface StaticFileResolver {
|
||||
fun resolve(name: String): String?
|
||||
}
|
||||
|
||||
class StaticFileResolverImpl : StaticFileResolver {
|
||||
class StaticFileResolverImpl(json: Json) : StaticFileResolver {
|
||||
private val mappings: Map<String, String>
|
||||
|
||||
init {
|
||||
val json = Json {}
|
||||
val manifest = javaClass.getResource("/css-manifest.json").readText()
|
||||
val manifestObject = json.parseToJsonElement(manifest).jsonObject
|
||||
val keys = manifestObject.keys
|
||||
|
||||
Reference in New Issue
Block a user