Fix "Arrow is redundant when parameter list is empty"
And other issues that ktlint now reports
This commit is contained in:
parent
ea616be814
commit
eef0fbf4be
10 changed files with 41 additions and 29 deletions
|
|
@ -87,8 +87,10 @@ class HomeFlowNode(
|
|||
analyticsService.screen(MobileScreen(screenName = MobileScreen.ScreenName.Home))
|
||||
}
|
||||
)
|
||||
whenChildAttached { commonLifecycle: Lifecycle,
|
||||
changeRoomMemberRolesNode: ChangeRoomMemberRolesEntryPoint.NodeProxy ->
|
||||
whenChildAttached {
|
||||
commonLifecycle: Lifecycle,
|
||||
changeRoomMemberRolesNode: ChangeRoomMemberRolesEntryPoint.NodeProxy,
|
||||
->
|
||||
commonLifecycle.coroutineScope.launch {
|
||||
changeRoomMemberRolesNode.waitForRoleChanged()
|
||||
withContext(NonCancellable) {
|
||||
|
|
|
|||
|
|
@ -34,14 +34,14 @@ class DefaultDeclineInviteTest {
|
|||
private val notificationCleaner =
|
||||
FakeNotificationCleaner(clearMembershipNotificationForRoomLambda = clearMembershipNotificationForRoomLambda)
|
||||
|
||||
private val successLeaveRoomLambda = lambdaRecorder<Result<Unit>> { -> Result.success(Unit) }
|
||||
private val successLeaveRoomLambda = lambdaRecorder<Result<Unit>> { Result.success(Unit) }
|
||||
private val successIgnoreUserLambda =
|
||||
lambdaRecorder<UserId, Result<Unit>> { _ -> Result.success(Unit) }
|
||||
private val successReportRoomLambda =
|
||||
lambdaRecorder<String?, Result<Unit>> { _ -> Result.success(Unit) }
|
||||
|
||||
private val failureLeaveRoomLambda =
|
||||
lambdaRecorder<Result<Unit>> { -> Result.failure(Exception("Leave room error")) }
|
||||
lambdaRecorder<Result<Unit>> { Result.failure(Exception("Leave room error")) }
|
||||
private val failureIgnoreUserLambda =
|
||||
lambdaRecorder<UserId, Result<Unit>> { _ -> Result.failure(Exception("Ignore user error")) }
|
||||
private val failureReportRoomLambda =
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ import org.junit.Test
|
|||
|
||||
class DefaultReportRoomTest {
|
||||
private val roomId = A_ROOM_ID
|
||||
private val successLeaveRoomLambda = lambdaRecorder<Result<Unit>> { -> Result.success(Unit) }
|
||||
private val successLeaveRoomLambda = lambdaRecorder<Result<Unit>> { Result.success(Unit) }
|
||||
private val successReportRoomLambda =
|
||||
lambdaRecorder<String?, Result<Unit>> { _ -> Result.success(Unit) }
|
||||
|
||||
private val failureLeaveRoomLambda =
|
||||
lambdaRecorder<Result<Unit>> { -> Result.failure(Exception("Leave room error")) }
|
||||
lambdaRecorder<Result<Unit>> { Result.failure(Exception("Leave room error")) }
|
||||
private val failureReportRoomLambda =
|
||||
lambdaRecorder<String?, Result<Unit>> { _ -> Result.failure(Exception("Report room error")) }
|
||||
|
||||
|
|
|
|||
|
|
@ -148,9 +148,11 @@ class RoomDetailsFlowNode(
|
|||
|
||||
override fun onBuilt() {
|
||||
super.onBuilt()
|
||||
whenChildrenAttached { commonLifecycle: Lifecycle,
|
||||
roomDetailsNode: RoomDetailsNode,
|
||||
changeRoomMemberRolesNode: ChangeRoomMemberRolesEntryPoint.NodeProxy ->
|
||||
whenChildrenAttached {
|
||||
commonLifecycle: Lifecycle,
|
||||
roomDetailsNode: RoomDetailsNode,
|
||||
changeRoomMemberRolesNode: ChangeRoomMemberRolesEntryPoint.NodeProxy,
|
||||
->
|
||||
commonLifecycle.coroutineScope.launch {
|
||||
changeRoomMemberRolesNode.waitForRoleChanged()
|
||||
withContext(NonCancellable) {
|
||||
|
|
|
|||
|
|
@ -105,9 +105,7 @@ class RoomDirectoryPresenterTest {
|
|||
|
||||
@Test
|
||||
fun `present - emit load more event`() = runTest {
|
||||
val loadMoreLambda = lambdaRecorder { ->
|
||||
Result.success(Unit)
|
||||
}
|
||||
val loadMoreLambda = lambdaRecorder<Result<Unit>> { Result.success(Unit) }
|
||||
val roomDirectoryList = FakeRoomDirectoryList(loadMoreLambda = loadMoreLambda)
|
||||
val roomDirectoryService = FakeRoomDirectoryService { roomDirectoryList }
|
||||
val presenter = createRoomDirectoryPresenter(roomDirectoryService = roomDirectoryService)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue