Fix moar ktlint issues
This commit is contained in:
parent
a831f05f6e
commit
5d086ad82d
528 changed files with 146 additions and 629 deletions
|
|
@ -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>()
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ class RoomDetailsFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins,
|
||||
) {
|
||||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
data object RoomDetails : NavTarget
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import io.element.android.libraries.matrix.api.room.MatrixRoom
|
|||
@Module
|
||||
@ContributesTo(RoomScope::class)
|
||||
object RoomMemberModule {
|
||||
|
||||
@Provides
|
||||
fun provideRoomMemberDetailsPresenterFactory(
|
||||
matrixClient: MatrixClient,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ class RoomDetailsEditNode @AssistedInject constructor(
|
|||
private val presenter: RoomDetailsEditPresenter,
|
||||
private val analyticsService: AnalyticsService,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
init {
|
||||
lifecycle.subscribe(
|
||||
onResume = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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()) }
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()) }
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ data class RoomMemberDetailsState(
|
|||
val eventSink: (RoomMemberDetailsEvents) -> Unit
|
||||
) {
|
||||
enum class ConfirmationDialog {
|
||||
Block, Unblock
|
||||
Block,
|
||||
Unblock
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ import kotlin.time.Duration.Companion.milliseconds
|
|||
|
||||
@ExperimentalCoroutinesApi
|
||||
class RoomDetailsPresenterTests {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ import java.io.File
|
|||
|
||||
@ExperimentalCoroutinesApi
|
||||
class RoomDetailsEditPresenterTest {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
internal class RoomInviteMembersPresenterTest {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ import org.junit.Test
|
|||
|
||||
@ExperimentalCoroutinesApi
|
||||
class RoomMemberListPresenterTests {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import org.junit.Test
|
|||
|
||||
@ExperimentalCoroutinesApi
|
||||
class RoomMemberDetailsPresenterTests {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue