Fix moar ktlint issues
This commit is contained in:
parent
a831f05f6e
commit
5d086ad82d
528 changed files with 146 additions and 629 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ class PollHistoryFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins
|
||||
) {
|
||||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
data object Root : NavTarget
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ class PollHistoryNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins,
|
||||
) {
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onEditPoll(pollStartEventId: EventId)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue