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

@ -29,7 +29,6 @@ import javax.inject.Inject
@ContributesBinding(AppScope::class)
class DefaultRoomDetailsEntryPoint @Inject constructor() : RoomDetailsEntryPoint {
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): RoomDetailsEntryPoint.NodeBuilder {
return object : RoomDetailsEntryPoint.NodeBuilder {
val plugins = ArrayList<Plugin>()

View file

@ -61,7 +61,6 @@ class RoomDetailsFlowNode @AssistedInject constructor(
buildContext = buildContext,
plugins = plugins,
) {
sealed interface NavTarget : Parcelable {
@Parcelize
data object RoomDetails : NavTarget

View file

@ -46,7 +46,6 @@ class RoomDetailsNode @AssistedInject constructor(
private val room: MatrixRoom,
private val analyticsService: AnalyticsService,
) : Node(buildContext, plugins = plugins) {
interface Callback : Plugin {
fun openRoomMemberList()
fun openInviteMembers()

View file

@ -58,7 +58,6 @@ class RoomDetailsPresenter @Inject constructor(
private val leaveRoomPresenter: LeaveRoomPresenter,
private val dispatchers: CoroutineDispatchers,
) : Presenter<RoomDetailsState> {
@Composable
override fun present(): RoomDetailsState {
val scope = rememberCoroutineScope()

View file

@ -29,7 +29,6 @@ import io.element.android.libraries.matrix.api.room.MatrixRoom
@Module
@ContributesTo(RoomScope::class)
object RoomMemberModule {
@Provides
fun provideRoomMemberDetailsPresenterFactory(
matrixClient: MatrixClient,

View file

@ -36,7 +36,6 @@ class RoomDetailsEditNode @AssistedInject constructor(
private val presenter: RoomDetailsEditPresenter,
private val analyticsService: AnalyticsService,
) : Node(buildContext, plugins = plugins) {
init {
lifecycle.subscribe(
onResume = {

View file

@ -53,7 +53,6 @@ class RoomDetailsEditPresenter @Inject constructor(
private val mediaPreProcessor: MediaPreProcessor,
permissionsPresenterFactory: PermissionsPresenter.Factory,
) : Presenter<RoomDetailsEditState> {
private val cameraPermissionPresenter = permissionsPresenterFactory.create(android.Manifest.permission.CAMERA)
private var pendingPermissionRequest = false

View file

@ -47,7 +47,6 @@ class RoomInviteMembersNode @AssistedInject constructor(
private val appErrorStateService: AppErrorStateService,
private val analyticsService: AnalyticsService,
) : Node(buildContext, plugins = plugins) {
private val coroutineScope = CoroutineScope(SupervisorJob() + coroutineDispatchers.io)
init {

View file

@ -47,7 +47,6 @@ class RoomInviteMembersPresenter @Inject constructor(
private val roomMemberListDataSource: RoomMemberListDataSource,
private val coroutineDispatchers: CoroutineDispatchers,
) : Presenter<RoomInviteMembersState> {
@Composable
override fun present(): RoomInviteMembersState {
val roomMembers = remember { mutableStateOf<AsyncData<ImmutableList<RoomMember>>>(AsyncData.Loading()) }

View file

@ -31,7 +31,6 @@ class RoomMemberListDataSource @Inject constructor(
private val room: MatrixRoom,
private val coroutineDispatchers: CoroutineDispatchers,
) {
suspend fun search(query: String): List<RoomMember> = withContext(coroutineDispatchers.io) {
val roomMembers = room.membersStateFlow
.dropWhile { it !is MatrixRoomMembersState.Ready }

View file

@ -38,7 +38,6 @@ class RoomMemberListNode @AssistedInject constructor(
private val presenter: RoomMemberListPresenter,
private val analyticsService: AnalyticsService,
) : Node(buildContext, plugins = plugins) {
interface Callback : Plugin {
fun openRoomMemberDetails(roomMemberId: UserId)
fun openInviteMembers()

View file

@ -41,7 +41,6 @@ class RoomMemberListPresenter @Inject constructor(
private val roomMemberListDataSource: RoomMemberListDataSource,
private val coroutineDispatchers: CoroutineDispatchers,
) : Presenter<RoomMemberListState> {
@Composable
override fun present(): RoomMemberListState {
var roomMembers by remember { mutableStateOf<AsyncData<RoomMembers>>(AsyncData.Loading()) }

View file

@ -48,7 +48,6 @@ class RoomMemberDetailsNode @AssistedInject constructor(
private val analyticsService: AnalyticsService,
presenterFactory: RoomMemberDetailsPresenter.Factory,
) : Node(buildContext, plugins = plugins) {
interface Callback : NodeInputs {
fun openAvatarPreview(username: String, avatarUrl: String)
fun onStartDM(roomId: RoomId)

View file

@ -47,7 +47,6 @@ class RoomMemberDetailsPresenter @AssistedInject constructor(
private val room: MatrixRoom,
private val startDMAction: StartDMAction,
) : Presenter<RoomMemberDetailsState> {
interface Factory {
fun create(roomMemberId: UserId): RoomMemberDetailsPresenter
}

View file

@ -31,6 +31,7 @@ data class RoomMemberDetailsState(
val eventSink: (RoomMemberDetailsEvents) -> Unit
) {
enum class ConfirmationDialog {
Block, Unblock
Block,
Unblock
}
}

View file

@ -39,7 +39,6 @@ class RoomNotificationSettingsNode @AssistedInject constructor(
presenterFactory: RoomNotificationSettingsPresenter.Factory,
private val analyticsService: AnalyticsService,
) : Node(buildContext, plugins = plugins) {
data class RoomNotificationSettingInput(
val showUserDefinedSettingStyle: Boolean
) : NodeInputs

View file

@ -49,7 +49,6 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor(
private val notificationSettingsService: NotificationSettingsService,
@Assisted private val showUserDefinedSettingStyle: Boolean,
) : Presenter<RoomNotificationSettingsState> {
@AssistedFactory
interface Factory {
fun create(showUserDefinedSettingStyle: Boolean): RoomNotificationSettingsPresenter

View file

@ -59,7 +59,6 @@ import kotlin.time.Duration.Companion.milliseconds
@ExperimentalCoroutinesApi
class RoomDetailsPresenterTests {
@get:Rule
val warmUpRule = WarmUpRule()

View file

@ -50,7 +50,6 @@ import java.io.File
@ExperimentalCoroutinesApi
class RoomDetailsEditPresenterTest {
@get:Rule
val warmUpRule = WarmUpRule()

View file

@ -49,7 +49,6 @@ import org.junit.Rule
import org.junit.Test
internal class RoomInviteMembersPresenterTest {
@get:Rule
val warmUpRule = WarmUpRule()

View file

@ -42,7 +42,6 @@ import org.junit.Test
@ExperimentalCoroutinesApi
class RoomMemberListPresenterTests {
@get:Rule
val warmUpRule = WarmUpRule()

View file

@ -45,7 +45,6 @@ import org.junit.Test
@ExperimentalCoroutinesApi
class RoomMemberDetailsPresenterTests {
@get:Rule
val warmUpRule = WarmUpRule()