Improve: Android Studio's Reformat

This commit is contained in:
LooKeR
2021-11-16 01:12:52 +05:30
parent e49b357173
commit a321e9bfa5
32 changed files with 91 additions and 80 deletions

View File

@ -5,5 +5,5 @@ class InstalledItem(
val packageName: String,
val version: String,
val versionCode: Long,
val signature: String
val signature: String,
)

View File

@ -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 &&

View File

@ -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() {

View File

@ -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()

View File

@ -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,