Fix moar ktlint issues

This commit is contained in:
Benoit Marty 2024-01-11 09:41:14 +01:00 committed by Benoit Marty
parent a831f05f6e
commit 5d086ad82d
528 changed files with 146 additions and 629 deletions

View file

@ -30,7 +30,6 @@ class DefaultEndPollAction @Inject constructor(
private val room: MatrixRoom,
private val analyticsService: AnalyticsService,
) : EndPollAction {
override suspend fun execute(pollStartId: EventId): Result<Unit> {
return room.endPoll(
pollStartId = pollStartId,

View file

@ -30,7 +30,6 @@ class DefaultSendPollResponseAction @Inject constructor(
private val room: MatrixRoom,
private val analyticsService: AnalyticsService,
) : SendPollResponseAction {
override suspend fun execute(pollStartId: EventId, answerId: String): Result<Unit> {
return room.sendPollResponse(
pollStartId = pollStartId,

View file

@ -39,7 +39,6 @@ class CreatePollNode @AssistedInject constructor(
presenterFactory: CreatePollPresenter.Factory,
analyticsService: AnalyticsService,
) : Node(buildContext, plugins = plugins) {
data class Inputs(val mode: CreatePollMode) : NodeInputs
private val inputs: Inputs = inputs()

View file

@ -52,7 +52,6 @@ class CreatePollPresenter @AssistedInject constructor(
@Assisted private val navigateUp: () -> Unit,
@Assisted private val mode: CreatePollMode,
) : Presenter<CreatePollState> {
@AssistedFactory
interface Factory {
fun create(backNavigator: () -> Unit, mode: CreatePollMode): CreatePollPresenter

View file

@ -31,7 +31,6 @@ class DefaultCreatePollEntryPoint @Inject constructor() : CreatePollEntryPoint {
val plugins = ArrayList<Plugin>()
return object : CreatePollEntryPoint.NodeBuilder {
override fun params(params: CreatePollEntryPoint.Params): CreatePollEntryPoint.NodeBuilder {
plugins += CreatePollNode.Inputs(mode = params.mode)
return this

View file

@ -49,7 +49,6 @@ class PollHistoryFlowNode @AssistedInject constructor(
buildContext = buildContext,
plugins = plugins
) {
sealed interface NavTarget : Parcelable {
@Parcelize
data object Root : NavTarget

View file

@ -37,7 +37,6 @@ class PollHistoryNode @AssistedInject constructor(
buildContext = buildContext,
plugins = plugins,
) {
interface Callback : Plugin {
fun onEditPoll(pollStartEventId: EventId)
}

View file

@ -46,7 +46,6 @@ class PollHistoryPresenter @Inject constructor(
private val endPollAction: EndPollAction,
private val pollHistoryItemFactory: PollHistoryItemsFactory,
) : Presenter<PollHistoryState> {
@Composable
override fun present(): PollHistoryState {
// TODO use room.rememberPollHistory() when working properly?

View file

@ -28,7 +28,6 @@ data class PollHistoryState(
val pollHistoryItems: PollHistoryItems,
val eventSink: (PollHistoryEvents) -> Unit,
) {
fun pollHistoryForFilter(filter: PollHistoryFilter): ImmutableList<PollHistoryItem> {
return when (filter) {
PollHistoryFilter.ONGOING -> pollHistoryItems.ongoing

View file

@ -30,7 +30,6 @@ class PollHistoryItemsFactory @Inject constructor(
private val daySeparatorFormatter: DaySeparatorFormatter,
private val dispatchers: CoroutineDispatchers,
) {
suspend fun create(timelineItems: List<MatrixTimelineItem>): PollHistoryItems = withContext(dispatchers.computation) {
val past = ArrayList<PollHistoryItem>()
val ongoing = ArrayList<PollHistoryItem>()

View file

@ -32,7 +32,6 @@ import javax.inject.Inject
class DefaultPollContentStateFactory @Inject constructor(
private val matrixClient: MatrixClient,
) : PollContentStateFactory {
override suspend fun create(
event: EventTimelineItem,
content: PollContent