mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Update: Migrate transform to InstalledItem method
This commit is contained in:
parent
acf3f0d1fd
commit
d875fc57c9
@ -149,6 +149,13 @@ fun Cursor.getRepository(): Repository = getBlob(getColumnIndex(ROW_DATA))
|
||||
}
|
||||
}
|
||||
|
||||
fun Cursor.getInstalledItem(): InstalledItem = InstalledItem(
|
||||
getString(getColumnIndex(ROW_PACKAGE_NAME)),
|
||||
getString(getColumnIndex(ROW_VERSION)),
|
||||
getLong(getColumnIndex(ROW_VERSION_CODE)),
|
||||
getString(getColumnIndex(ROW_SIGNATURE))
|
||||
)
|
||||
|
||||
fun <T> ByteArray.jsonParse(callback: (JsonParser) -> T): T {
|
||||
return Json.factory.createParser(this).use { it.parseDictionary(callback) }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user