Update ktlint to 0.43.2
This commit is contained in:
parent
dbfa4e554b
commit
75db002369
3 changed files with 2 additions and 10 deletions
|
@ -192,7 +192,7 @@ dependencies {
|
||||||
|
|
||||||
/** Checkstyle **/
|
/** Checkstyle **/
|
||||||
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
|
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
|
||||||
ktlint 'com.pinterest:ktlint:0.40.0'
|
ktlint 'com.pinterest:ktlint:0.43.2'
|
||||||
|
|
||||||
/** Kotlin **/
|
/** Kotlin **/
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
|
||||||
|
|
|
@ -183,28 +183,23 @@ class FeedLoadService : Service() {
|
||||||
|
|
||||||
subscriptions
|
subscriptions
|
||||||
.take(1)
|
.take(1)
|
||||||
|
|
||||||
.doOnNext {
|
.doOnNext {
|
||||||
currentProgress.set(0)
|
currentProgress.set(0)
|
||||||
maxProgress.set(it.size)
|
maxProgress.set(it.size)
|
||||||
}
|
}
|
||||||
.filter { it.isNotEmpty() }
|
.filter { it.isNotEmpty() }
|
||||||
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.doOnNext {
|
.doOnNext {
|
||||||
startForeground(NOTIFICATION_ID, notificationBuilder.build())
|
startForeground(NOTIFICATION_ID, notificationBuilder.build())
|
||||||
updateNotificationProgress(null)
|
updateNotificationProgress(null)
|
||||||
broadcastProgress()
|
broadcastProgress()
|
||||||
}
|
}
|
||||||
|
|
||||||
.observeOn(Schedulers.io())
|
.observeOn(Schedulers.io())
|
||||||
.flatMap { Flowable.fromIterable(it) }
|
.flatMap { Flowable.fromIterable(it) }
|
||||||
.takeWhile { !cancelSignal.get() }
|
.takeWhile { !cancelSignal.get() }
|
||||||
|
|
||||||
.parallel(PARALLEL_EXTRACTIONS, PARALLEL_EXTRACTIONS * 2)
|
.parallel(PARALLEL_EXTRACTIONS, PARALLEL_EXTRACTIONS * 2)
|
||||||
.runOn(Schedulers.io(), PARALLEL_EXTRACTIONS * 2)
|
.runOn(Schedulers.io(), PARALLEL_EXTRACTIONS * 2)
|
||||||
.filter { !cancelSignal.get() }
|
.filter { !cancelSignal.get() }
|
||||||
|
|
||||||
.map { subscriptionEntity ->
|
.map { subscriptionEntity ->
|
||||||
var error: Throwable? = null
|
var error: Throwable? = null
|
||||||
try {
|
try {
|
||||||
|
@ -239,14 +234,11 @@ class FeedLoadService : Service() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sequential()
|
.sequential()
|
||||||
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.doOnNext(notificationsConsumer)
|
.doOnNext(notificationsConsumer)
|
||||||
|
|
||||||
.observeOn(Schedulers.io())
|
.observeOn(Schedulers.io())
|
||||||
.buffer(BUFFER_COUNT_BEFORE_INSERT)
|
.buffer(BUFFER_COUNT_BEFORE_INSERT)
|
||||||
.doOnNext(databaseConsumer)
|
.doOnNext(databaseConsumer)
|
||||||
|
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(resultSubscriber)
|
.subscribe(resultSubscriber)
|
||||||
|
|
|
@ -9,12 +9,12 @@ import org.junit.Before
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.mockito.Mockito
|
import org.mockito.Mockito
|
||||||
import org.mockito.Mockito.`when`
|
|
||||||
import org.mockito.Mockito.anyBoolean
|
import org.mockito.Mockito.anyBoolean
|
||||||
import org.mockito.Mockito.anyInt
|
import org.mockito.Mockito.anyInt
|
||||||
import org.mockito.Mockito.anyString
|
import org.mockito.Mockito.anyString
|
||||||
import org.mockito.Mockito.atLeastOnce
|
import org.mockito.Mockito.atLeastOnce
|
||||||
import org.mockito.Mockito.verify
|
import org.mockito.Mockito.verify
|
||||||
|
import org.mockito.Mockito.`when`
|
||||||
import org.mockito.Mockito.withSettings
|
import org.mockito.Mockito.withSettings
|
||||||
import org.mockito.junit.MockitoJUnitRunner
|
import org.mockito.junit.MockitoJUnitRunner
|
||||||
import org.schabi.newpipe.streams.io.StoredFileHelper
|
import org.schabi.newpipe.streams.io.StoredFileHelper
|
||||||
|
|
Loading…
Reference in a new issue