mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Merge pull request #11830 from nextcloud/dependabot/gradle/com.diffplug.spotless-6.20.0
Build(deps): Bump com.diffplug.spotless from 6.19.0 to 6.20.0
This commit is contained in:
commit
cacc62a1a9
16 changed files with 75 additions and 26 deletions
|
@ -16,7 +16,7 @@ buildscript {
|
|||
}
|
||||
|
||||
plugins {
|
||||
id "com.diffplug.spotless" version "6.19.0"
|
||||
id "com.diffplug.spotless" version "6.20.0"
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
|
|
@ -50,7 +50,10 @@ class ManualAsyncRunner : AsyncRunner {
|
|||
): Cancellable {
|
||||
val remove: Function1<Runnable, Boolean> = queue::remove
|
||||
val taskWrapper = Task(
|
||||
postResult = { it.run(); true },
|
||||
postResult = {
|
||||
it.run()
|
||||
true
|
||||
},
|
||||
removeFromQueue = remove,
|
||||
taskBody = task,
|
||||
onSuccess = onResult,
|
||||
|
|
|
@ -87,7 +87,8 @@ class ShowErrorActivity : AppCompatActivity() {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.error_share -> {
|
||||
onClickedShare(); true
|
||||
onClickedShare()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
|
|
@ -66,7 +66,8 @@ class EtmAccountsFragment : EtmBaseFragment() {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.etm_accounts_share -> {
|
||||
onClickedShare(); true
|
||||
onClickedShare()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
|
|
@ -124,19 +124,24 @@ class EtmBackgroundJobsFragment : EtmBaseFragment() {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.etm_background_jobs_cancel -> {
|
||||
vm.cancelAllJobs(); true
|
||||
vm.cancelAllJobs()
|
||||
true
|
||||
}
|
||||
R.id.etm_background_jobs_prune -> {
|
||||
vm.pruneJobs(); true
|
||||
vm.pruneJobs()
|
||||
true
|
||||
}
|
||||
R.id.etm_background_jobs_start_test -> {
|
||||
vm.startTestJob(periodic = false); true
|
||||
vm.startTestJob(periodic = false)
|
||||
true
|
||||
}
|
||||
R.id.etm_background_jobs_schedule_test -> {
|
||||
vm.startTestJob(periodic = true); true
|
||||
vm.startTestJob(periodic = true)
|
||||
true
|
||||
}
|
||||
R.id.etm_background_jobs_cancel_test -> {
|
||||
vm.cancelTestJob(); true
|
||||
vm.cancelTestJob()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
|
|
@ -134,10 +134,12 @@ class EtmFileTransferFragment : EtmBaseFragment() {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.etm_test_download -> {
|
||||
scheduleTestDownload(); true
|
||||
scheduleTestDownload()
|
||||
true
|
||||
}
|
||||
R.id.etm_test_upload -> {
|
||||
scheduleTestUpload(); true
|
||||
scheduleTestUpload()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
|
|
@ -62,7 +62,8 @@ class EtmMigrations : EtmBaseFragment() {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.etm_migrations_delete -> {
|
||||
onDeleteMigrationsClicked(); true
|
||||
onDeleteMigrationsClicked()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
|
|
@ -61,7 +61,8 @@ class EtmPreferencesFragment : EtmBaseFragment() {
|
|||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.etm_preferences_share -> {
|
||||
onClickedShare(); true
|
||||
onClickedShare()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
|
|
@ -99,15 +99,27 @@ class TransferManagerImpl(
|
|||
runner.postTask(
|
||||
task = createDownloadTask(request),
|
||||
onProgress = { progress: Int -> registry.progress(uuid, progress) },
|
||||
onResult = { result -> registry.complete(uuid, result.success, result.file); registry.startNext() },
|
||||
onError = { registry.complete(uuid, false); registry.startNext() }
|
||||
onResult = { result ->
|
||||
registry.complete(uuid, result.success, result.file)
|
||||
registry.startNext()
|
||||
},
|
||||
onError = {
|
||||
registry.complete(uuid, false)
|
||||
registry.startNext()
|
||||
}
|
||||
)
|
||||
} else if (request is UploadRequest) {
|
||||
runner.postTask(
|
||||
task = createUploadTask(request),
|
||||
onProgress = { progress: Int -> registry.progress(uuid, progress) },
|
||||
onResult = { result -> registry.complete(uuid, result.success, result.file); registry.startNext() },
|
||||
onError = { registry.complete(uuid, false); registry.startNext() }
|
||||
onResult = { result ->
|
||||
registry.complete(uuid, result.success, result.file)
|
||||
registry.startNext()
|
||||
},
|
||||
onError = {
|
||||
registry.complete(uuid, false)
|
||||
registry.startNext()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,10 @@ class LogsEmailSender(private val context: Context, private val clock: Clock, pr
|
|||
fun send(logs: List<LogEntry>) {
|
||||
if (task == null) {
|
||||
val outFile = File(context.cacheDir, "attachments/logs.txt")
|
||||
task = runner.postQuickTask(Task(context, logs, outFile, clock.tz), onResult = { task = null; send(it) })
|
||||
task = runner.postQuickTask(Task(context, logs, outFile, clock.tz), onResult = {
|
||||
task = null
|
||||
send(it)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,10 @@ open class FileSortOrder(@JvmField var name: String, var isAscending: Boolean) {
|
|||
|
||||
@Suppress("EnumNaming", "EnumEntryName") // already saved in user preferences -.-'
|
||||
enum class Type {
|
||||
trashBinView, localFileListView // ktlint-disable enum-entry-name-case
|
||||
trashBinView,
|
||||
|
||||
@Suppress("ktlint:standard:enum-entry-name-case")
|
||||
localFileListView
|
||||
}
|
||||
|
||||
enum class SortType {
|
||||
|
|
|
@ -82,7 +82,6 @@
|
|||
<dimen name="scroll_view_height">180dp</dimen>
|
||||
<dimen name="upload_list_item_frame_layout_width">60dp</dimen>
|
||||
<dimen name="upload_list_item_text_size">12sp</dimen>
|
||||
<dimen name="upload_list_item_image_size">24dp</dimen>
|
||||
<dimen name="uploader_list_item_layout_image_margin">12dp</dimen>
|
||||
<dimen name="media_grid_spacing">2dp</dimen>
|
||||
<dimen name="account_item_layout_user_image_left_start_margin">12dp</dimen>
|
||||
|
|
|
@ -60,7 +60,10 @@ class ManualAsyncRunnerTest {
|
|||
MockitoAnnotations.initMocks(this)
|
||||
runner = ManualAsyncRunner()
|
||||
taskCalls = EMPTY
|
||||
whenever(task.invoke()).thenAnswer { taskCalls++; taskCalls }
|
||||
whenever(task.invoke()).thenAnswer {
|
||||
taskCalls++
|
||||
taskCalls
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -57,7 +57,10 @@ class TaskTest {
|
|||
@Before
|
||||
fun setUp() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
val postResult = { r: Runnable -> r.run(); true }
|
||||
val postResult = { r: Runnable ->
|
||||
r.run()
|
||||
true
|
||||
}
|
||||
task = Task(this::post, removeFromQueue, taskBody, onResult, onError, onProgress)
|
||||
}
|
||||
|
||||
|
|
|
@ -126,9 +126,18 @@ class LoggerTest {
|
|||
val tag = "test tag"
|
||||
val message = "test log message"
|
||||
val latch = CountDownLatch(LATCH_INIT)
|
||||
doAnswer { it.callRealMethod(); latch.countDown() }.whenever(logHandler).open()
|
||||
doAnswer { it.callRealMethod(); latch.countDown() }.whenever(logHandler).write(any())
|
||||
doAnswer { it.callRealMethod(); latch.countDown() }.whenever(logHandler).close()
|
||||
doAnswer {
|
||||
it.callRealMethod()
|
||||
latch.countDown()
|
||||
}.whenever(logHandler).open()
|
||||
doAnswer {
|
||||
it.callRealMethod()
|
||||
latch.countDown()
|
||||
}.whenever(logHandler).write(any())
|
||||
doAnswer {
|
||||
it.callRealMethod()
|
||||
latch.countDown()
|
||||
}.whenever(logHandler).close()
|
||||
|
||||
// GIVEN
|
||||
// logger event loop is running
|
||||
|
|
|
@ -68,7 +68,10 @@ class LogsViewModelTest {
|
|||
var onLoadedCallback: OnLogsLoaded? = null
|
||||
|
||||
override val lostEntries: Boolean = false
|
||||
override fun load(onLoaded: OnLogsLoaded) { this.onLoadedCallback = onLoaded; loadRequestCount++ }
|
||||
override fun load(onLoaded: OnLogsLoaded) {
|
||||
this.onLoadedCallback = onLoaded
|
||||
loadRequestCount++
|
||||
}
|
||||
override fun deleteAll() {
|
||||
/* no implementation needed */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue