mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-21 06:39:19 +00:00
Improve: Android Studio's Reformat
This commit is contained in:
@ -5,5 +5,5 @@ class InstalledItem(
|
||||
val packageName: String,
|
||||
val version: String,
|
||||
val versionCode: Long,
|
||||
val signature: String
|
||||
val signature: String,
|
||||
)
|
||||
|
@ -28,7 +28,7 @@ data class Product(
|
||||
val licenses: List<String>,
|
||||
val donates: List<Donate>,
|
||||
val screenshots: List<Screenshot>,
|
||||
val releases: List<Release>
|
||||
val releases: List<Release>,
|
||||
) {
|
||||
data class Author(val name: String, val email: String, val web: String)
|
||||
|
||||
@ -163,7 +163,7 @@ data class Product(
|
||||
fun <T> findSuggested(
|
||||
products: List<T>,
|
||||
installedItem: InstalledItem?,
|
||||
extract: (T) -> Product
|
||||
extract: (T) -> Product,
|
||||
): T? {
|
||||
return products.maxWithOrNull(compareBy({
|
||||
extract(it).compatible &&
|
||||
|
@ -10,7 +10,7 @@ import com.looker.droidify.utility.extension.json.forEachKey
|
||||
data class ProductItem(
|
||||
var repositoryId: Long, var packageName: String, var name: String, var summary: String,
|
||||
val icon: String, val metadataIcon: String, val version: String, var installedVersion: String,
|
||||
var compatible: Boolean, var canUpdate: Boolean, var matchRank: Int
|
||||
var compatible: Boolean, var canUpdate: Boolean, var matchRank: Int,
|
||||
) {
|
||||
sealed class Section : KParcelable {
|
||||
object All : Section() {
|
||||
|
@ -29,7 +29,7 @@ data class Release(
|
||||
val permissions: List<String>,
|
||||
val features: List<String>,
|
||||
val platforms: List<String>,
|
||||
val incompatibilities: List<Incompatibility>
|
||||
val incompatibilities: List<Incompatibility>,
|
||||
) {
|
||||
sealed class Incompatibility {
|
||||
object MinSdk : Incompatibility()
|
||||
|
@ -11,7 +11,7 @@ data class Repository(
|
||||
var id: Long, val address: String, val mirrors: List<String>,
|
||||
val name: String, val description: String, val version: Int, val enabled: Boolean,
|
||||
val fingerprint: String, val lastModified: String, val entityTag: String,
|
||||
val updated: Long, val timestamp: Long, val authentication: String
|
||||
val updated: Long, val timestamp: Long, val authentication: String,
|
||||
) {
|
||||
fun edit(address: String, fingerprint: String, authentication: String): Repository {
|
||||
val addressChanged = this.address != address
|
||||
@ -28,7 +28,7 @@ data class Repository(
|
||||
|
||||
fun update(
|
||||
mirrors: List<String>, name: String, description: String, version: Int,
|
||||
lastModified: String, entityTag: String, timestamp: Long
|
||||
lastModified: String, entityTag: String, timestamp: Long,
|
||||
): Repository {
|
||||
return copy(
|
||||
mirrors = mirrors, name = name, description = description,
|
||||
@ -100,7 +100,7 @@ data class Repository(
|
||||
fun newRepository(
|
||||
address: String,
|
||||
fingerprint: String,
|
||||
authentication: String
|
||||
authentication: String,
|
||||
): Repository {
|
||||
val name = try {
|
||||
URL(address).let { "${it.host}${it.path}" }
|
||||
@ -112,7 +112,7 @@ data class Repository(
|
||||
|
||||
private fun defaultRepository(
|
||||
address: String, name: String, description: String,
|
||||
version: Int, enabled: Boolean, fingerprint: String, authentication: String
|
||||
version: Int, enabled: Boolean, fingerprint: String, authentication: String,
|
||||
): Repository {
|
||||
return Repository(
|
||||
-1, address, emptyList(), name, description, version, enabled,
|
||||
|
Reference in New Issue
Block a user