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

@ -9,7 +9,7 @@ import android.os.IBinder
class Connection<B : IBinder, S : ConnectionService<B>>(
private val serviceClass: Class<S>,
private val onBind: ((Connection<B, S>, B) -> Unit)? = null,
private val onUnbind: ((Connection<B, S>, B) -> Unit)? = null
private val onUnbind: ((Connection<B, S>, B) -> Unit)? = null,
) : ServiceConnection {
var binder: B? = null
private set

View File

@ -78,7 +78,7 @@ class DownloadService : ConnectionService<DownloadService.Binder>() {
class Success(
packageName: String, name: String, val release: Release,
val consume: () -> Unit
val consume: () -> Unit,
) : State(packageName, name)
class Error(packageName: String, name: String) : State(packageName, name)
@ -89,7 +89,7 @@ class DownloadService : ConnectionService<DownloadService.Binder>() {
private class Task(
val packageName: String, val name: String, val release: Release,
val url: String, val authentication: String
val url: String, val authentication: String,
) {
val notificationTag: String
get() = "download-$packageName"

View File

@ -49,7 +49,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
data class Connecting(val name: String) : State()
data class Syncing(
val name: String, val stage: RepositoryUpdater.Stage,
val read: Long, val total: Long?
val read: Long, val total: Long?,
) : State()
object Finishing : State()
@ -58,7 +58,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
private class Task(val repositoryId: Long, val manual: Boolean)
private data class CurrentTask(
val task: Task?, val disposable: Disposable,
val hasUpdates: Boolean, val lastState: State
val hasUpdates: Boolean, val lastState: State,
)
private enum class Started { NO, AUTO, MANUAL }