Fix moar ktlint issues
This commit is contained in:
parent
a831f05f6e
commit
5d086ad82d
528 changed files with 146 additions and 629 deletions
|
|
@ -27,12 +27,10 @@ import javax.inject.Inject
|
|||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultRoomListEntryPoint @Inject constructor() : RoomListEntryPoint {
|
||||
|
||||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): RoomListEntryPoint.NodeBuilder {
|
||||
val plugins = ArrayList<Plugin>()
|
||||
|
||||
return object : RoomListEntryPoint.NodeBuilder {
|
||||
|
||||
override fun callback(callback: RoomListEntryPoint.Callback): RoomListEntryPoint.NodeBuilder {
|
||||
plugins += callback
|
||||
return this
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ class RoomListNode @AssistedInject constructor(
|
|||
private val inviteFriendsUseCase: InviteFriendsUseCase,
|
||||
private val analyticsService: AnalyticsService,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
init {
|
||||
lifecycle.subscribe(
|
||||
onResume = {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ class RoomListPresenter @Inject constructor(
|
|||
private val featureFlagService: FeatureFlagService,
|
||||
private val indicatorService: IndicatorService,
|
||||
) : Presenter<RoomListState> {
|
||||
|
||||
@Composable
|
||||
override fun present(): RoomListState {
|
||||
val leaveRoomState = leaveRoomPresenter.present()
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ class DefaultInviteStateDataSource @Inject constructor(
|
|||
private val seenInvitesStore: SeenInvitesStore,
|
||||
private val coroutineDispatchers: CoroutineDispatchers,
|
||||
) : InviteStateDataSource {
|
||||
|
||||
@Composable
|
||||
override fun inviteState(): InvitesState {
|
||||
val invites by client
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import androidx.compose.runtime.Composable
|
|||
import io.element.android.features.roomlist.impl.InvitesState
|
||||
|
||||
interface InviteStateDataSource {
|
||||
|
||||
@Composable
|
||||
fun inviteState(): InvitesState
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
|||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
|
||||
object RoomListRoomSummaryPlaceholders {
|
||||
|
||||
fun create(id: String): RoomListRoomSummary {
|
||||
return RoomListRoomSummary(
|
||||
id = id,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class RoomListPresenterTests {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import kotlinx.coroutines.test.runTest
|
|||
import org.junit.Test
|
||||
|
||||
internal class DefaultInviteStateDataSourceTest {
|
||||
|
||||
@Test
|
||||
fun `emits NoInvites state if invites list is empty`() = runTest {
|
||||
val roomListService = FakeRoomListService()
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import kotlinx.coroutines.flow.flowOf
|
|||
class FakeInviteDataSource(
|
||||
private val flow: Flow<InvitesState> = flowOf()
|
||||
) : InviteStateDataSource {
|
||||
|
||||
@Composable
|
||||
override fun inviteState(): InvitesState {
|
||||
val state = flow.collectAsState(initial = InvitesState.NoInvites)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue