mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-06 16:43:43 +00:00
Enable detekt rules OptionalUnit and fix existing issues.
This commit is contained in:
committed by
Benoit Marty
parent
f7536a5450
commit
0e219200b0
@@ -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(
|
||||||
|
|||||||
+1
-2
@@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user