mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-17 04:49:20 +00:00
Improve: Android Studio's Reformat
This commit is contained in:
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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 }
|
||||
|
Reference in New Issue
Block a user