Merge pull request #6126 from vector-im/task/eric/when-arrow-alignment

Code Style Change - Disable when arrow alignment
This commit is contained in:
Benoit Marty 2022-06-08 16:09:20 +02:00 committed by GitHub
commit 928183ff64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
563 changed files with 3165 additions and 3152 deletions

View File

@ -764,7 +764,7 @@ ij_groovy_while_on_new_line = false
ij_groovy_wrap_long_lines = false
[{*.gradle.kts,*.kt,*.kts,*.main.kts}]
ij_kotlin_align_in_columns_case_branch = true
ij_kotlin_align_in_columns_case_branch = false
ij_kotlin_align_multiline_binary_operation = false
ij_kotlin_align_multiline_extends_list = false
ij_kotlin_align_multiline_method_parentheses = false

1
changelog.d/6126.misc Normal file
View File

@ -0,0 +1 @@
Disables when arrow alignment in code style

View File

@ -33,8 +33,10 @@ internal fun LiveLocationShareAggregatedSummaryEntity.Companion.where(
.equalTo(LiveLocationShareAggregatedSummaryEntityFields.EVENT_ID, eventId)
}
internal fun LiveLocationShareAggregatedSummaryEntity.Companion.whereRoomId(realm: Realm,
roomId: String): RealmQuery<LiveLocationShareAggregatedSummaryEntity> {
internal fun LiveLocationShareAggregatedSummaryEntity.Companion.whereRoomId(
realm: Realm,
roomId: String
): RealmQuery<LiveLocationShareAggregatedSummaryEntity> {
return realm.where<LiveLocationShareAggregatedSummaryEntity>()
.equalTo(LiveLocationShareAggregatedSummaryEntityFields.ROOM_ID, roomId)
}

View File

@ -494,8 +494,10 @@ internal class TimelineChunk(
val firstInsertion = results[range.startIndex]!!
val lastBeforeInsertion = builtEvents[range.startIndex - 1]
if (firstInsertion.displayIndex + 1 != lastBeforeInsertion.displayIndex) {
Timber.i("handleDatabaseChangeSet: skip insertion at ${range.startIndex}/${builtEvents.size}, " +
"displayIndex mismatch at ${range.startIndex}: ${firstInsertion.displayIndex} -> ${lastBeforeInsertion.displayIndex}")
Timber.i(
"handleDatabaseChangeSet: skip insertion at ${range.startIndex}/${builtEvents.size}, " +
"displayIndex mismatch at ${range.startIndex}: ${firstInsertion.displayIndex} -> ${lastBeforeInsertion.displayIndex}"
)
continue
}
}
@ -504,9 +506,11 @@ internal class TimelineChunk(
val lastInsertion = results[range.startIndex + range.length - 1]!!
val firstAfterInsertion = builtEvents[range.startIndex]
if (firstAfterInsertion.displayIndex + 1 != lastInsertion.displayIndex) {
Timber.i("handleDatabaseChangeSet: skip insertion at ${range.startIndex}/${builtEvents.size}, " +
Timber.i(
"handleDatabaseChangeSet: skip insertion at ${range.startIndex}/${builtEvents.size}, " +
"displayIndex mismatch at ${range.startIndex + range.length}: " +
"${firstAfterInsertion.displayIndex} -> ${lastInsertion.displayIndex}")
"${firstAfterInsertion.displayIndex} -> ${lastInsertion.displayIndex}"
)
continue
}
}

View File

@ -38,7 +38,8 @@ class WebviewPermissionUtilsTest {
fun filterPermissionsToBeGranted_selectedAndGrantedNothing() {
val permissions = utils.filterPermissionsToBeGranted(
selectedWebPermissions = listOf(),
androidPermissionResult = mapOf())
androidPermissionResult = mapOf()
)
permissions shouldBeEqualTo listOf()
}
@ -46,7 +47,8 @@ class WebviewPermissionUtilsTest {
fun filterPermissionsToBeGranted_selectedNothingGrantedCamera() {
val permissions = utils.filterPermissionsToBeGranted(
selectedWebPermissions = listOf(),
androidPermissionResult = mapOf(Manifest.permission.CAMERA to true))
androidPermissionResult = mapOf(Manifest.permission.CAMERA to true)
)
permissions shouldBeEqualTo listOf()
}
@ -54,7 +56,8 @@ class WebviewPermissionUtilsTest {
fun filterPermissionsToBeGranted_selectedAndPreviouslyGrantedCamera() {
val permissions = utils.filterPermissionsToBeGranted(
selectedWebPermissions = listOf(PermissionRequest.RESOURCE_VIDEO_CAPTURE),
androidPermissionResult = mapOf())
androidPermissionResult = mapOf()
)
permissions shouldBeEqualTo listOf(PermissionRequest.RESOURCE_VIDEO_CAPTURE)
}
@ -62,7 +65,8 @@ class WebviewPermissionUtilsTest {
fun filterPermissionsToBeGranted_selectedAndGrantedCamera() {
val permissions = utils.filterPermissionsToBeGranted(
selectedWebPermissions = listOf(PermissionRequest.RESOURCE_VIDEO_CAPTURE),
androidPermissionResult = mapOf(Manifest.permission.CAMERA to true))
androidPermissionResult = mapOf(Manifest.permission.CAMERA to true)
)
permissions shouldBeEqualTo listOf(PermissionRequest.RESOURCE_VIDEO_CAPTURE)
}
@ -70,7 +74,8 @@ class WebviewPermissionUtilsTest {
fun filterPermissionsToBeGranted_selectedAndDeniedCamera() {
val permissions = utils.filterPermissionsToBeGranted(
selectedWebPermissions = listOf(PermissionRequest.RESOURCE_VIDEO_CAPTURE),
androidPermissionResult = mapOf(Manifest.permission.CAMERA to false))
androidPermissionResult = mapOf(Manifest.permission.CAMERA to false)
)
permissions shouldBeEqualTo listOf()
}
@ -78,7 +83,8 @@ class WebviewPermissionUtilsTest {
fun filterPermissionsToBeGranted_selectedProtectedMediaGrantedNothing() {
val permissions = utils.filterPermissionsToBeGranted(
selectedWebPermissions = listOf(PermissionRequest.RESOURCE_PROTECTED_MEDIA_ID),
androidPermissionResult = mapOf(Manifest.permission.CAMERA to false))
androidPermissionResult = mapOf(Manifest.permission.CAMERA to false)
)
permissions shouldBeEqualTo listOf(PermissionRequest.RESOURCE_PROTECTED_MEDIA_ID)
}
}