Skip to content

Commit

Permalink
Fix build after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle committed Oct 7, 2024
1 parent f78f4dd commit 5ad7032
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import io.element.android.libraries.architecture.Presenter
import io.element.android.libraries.architecture.runUpdatingState
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
import io.element.android.libraries.core.extensions.finally
import io.element.android.libraries.core.meta.BuildMeta
import io.element.android.libraries.matrix.api.core.UserId
import io.element.android.libraries.matrix.api.room.MatrixRoom
import io.element.android.libraries.matrix.api.room.RoomMember
Expand All @@ -39,13 +40,13 @@ import kotlinx.coroutines.launch
import javax.inject.Inject

class RoomMembersModerationPresenter @Inject constructor(
private val buildMeta: BuildMeta,
private val room: MatrixRoom,
private val dispatchers: CoroutineDispatchers,
private val analyticsService: AnalyticsService,
) : Presenter<RoomMembersModerationState> {
private var selectedMember by mutableStateOf<RoomMember?>(null)

//isDebugBuild = false,
private suspend fun canBan() = room.canBan().getOrDefault(false)
private suspend fun canKick() = room.canKick().getOrDefault(false)

Expand Down Expand Up @@ -134,6 +135,7 @@ class RoomMembersModerationPresenter @Inject constructor(
}

return RoomMembersModerationState(
isDebugBuild = buildMeta.isDebuggable,
canDisplayModerationActions = canDisplayModerationActions,
selectedRoomMember = selectedMember,
actions = moderationActions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ class RoomMembersModerationPresenterTest {
analyticsService: FakeAnalyticsService = FakeAnalyticsService(),
): RoomMembersModerationPresenter {
return RoomMembersModerationPresenter(
buildMeta = buildMeta,
room = matrixRoom,
dispatchers = dispatchers,
analyticsService = analyticsService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import io.element.android.features.roomlist.impl.filters.selection.DefaultFilter
import io.element.android.features.roomlist.impl.search.RoomListSearchDataSource
import io.element.android.features.roomlist.impl.search.RoomListSearchPresenter
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
import io.element.android.libraries.core.meta.BuildMeta
import io.element.android.libraries.dateformatter.impl.DateFormatters
import io.element.android.libraries.dateformatter.impl.DefaultLastMessageTimestampFormatter
import io.element.android.libraries.dateformatter.impl.LocalDateTimeProvider
Expand All @@ -51,12 +52,14 @@ import kotlinx.datetime.Clock
import kotlinx.datetime.TimeZone
import timber.log.Timber
import java.util.Locale
import javax.inject.Inject

class RoomListScreen(
context: Context,
private val matrixClient: MatrixClient,
private val coroutineDispatchers: CoroutineDispatchers = Singleton.coroutineDispatchers,
) {
@Inject lateinit var buildMeta: BuildMeta
private val clock = Clock.System
private val locale = Locale.getDefault()
private val timeZone = TimeZone.currentSystemDefault()
Expand Down

0 comments on commit 5ad7032

Please sign in to comment.