Enable detekt rules OptionalUnit and fix existing issues.
This commit is contained in:
parent
4ba4bd1f56
commit
6fff373613
5 changed files with 10 additions and 8 deletions
|
|
@ -100,13 +100,13 @@ class LoggedInFlowNode @AssistedInject constructor(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
interface Callback : Plugin {
|
interface Callback : Plugin {
|
||||||
fun onOpenBugReport() = Unit
|
fun onOpenBugReport()
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LifecycleCallback : NodeLifecycleCallback {
|
interface LifecycleCallback : NodeLifecycleCallback {
|
||||||
fun onFlowCreated(identifier: String, client: MatrixClient) = Unit
|
fun onFlowCreated(identifier: String, client: MatrixClient)
|
||||||
|
|
||||||
fun onFlowReleased(identifier: String, client: MatrixClient) = Unit
|
fun onFlowReleased(identifier: String, client: MatrixClient)
|
||||||
}
|
}
|
||||||
|
|
||||||
data class Inputs(
|
data class Inputs(
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,8 @@ class RoomLoadedFlowNode @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LifecycleCallback : NodeLifecycleCallback {
|
interface LifecycleCallback : NodeLifecycleCallback {
|
||||||
fun onFlowCreated(identifier: String, room: MatrixRoom) = Unit
|
fun onFlowCreated(identifier: String, room: MatrixRoom)
|
||||||
fun onFlowReleased(identifier: String, room: MatrixRoom) = Unit
|
fun onFlowReleased(identifier: String, room: MatrixRoom)
|
||||||
}
|
}
|
||||||
|
|
||||||
data class Inputs(
|
data class Inputs(
|
||||||
|
|
|
||||||
|
|
@ -152,8 +152,7 @@ class InviteListPresenter @Inject constructor(
|
||||||
client.getRoom(roomId)?.use {
|
client.getRoom(roomId)?.use {
|
||||||
it.leave().getOrThrow()
|
it.leave().getOrThrow()
|
||||||
notificationDrawerManager.clearMembershipNotificationForRoom(client.sessionId, roomId)
|
notificationDrawerManager.clearMembershipNotificationForRoom(client.sessionId, roomId)
|
||||||
}
|
}.let { }
|
||||||
Unit
|
|
||||||
}.runCatchingUpdatingState(declinedAction)
|
}.runCatchingUpdatingState(declinedAction)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,9 @@ fun MessagesView(
|
||||||
state.eventSink(MessagesEvents.ToggleReaction(emoji, event.eventId))
|
state.eventSink(MessagesEvents.ToggleReaction(emoji, event.eventId))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onMoreReactionsClicked(event: TimelineItem.Event): Unit =
|
fun onMoreReactionsClicked(event: TimelineItem.Event) {
|
||||||
state.customReactionState.eventSink(CustomReactionEvents.UpdateSelectedEvent(event.eventId))
|
state.customReactionState.eventSink(CustomReactionEvents.UpdateSelectedEvent(event.eventId))
|
||||||
|
}
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ style:
|
||||||
active: true
|
active: true
|
||||||
UseCheckOrError:
|
UseCheckOrError:
|
||||||
active: true
|
active: true
|
||||||
|
OptionalUnit:
|
||||||
|
active: true
|
||||||
|
|
||||||
coroutines:
|
coroutines:
|
||||||
GlobalCoroutineUsage:
|
GlobalCoroutineUsage:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue