mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Use session.getRoom(roomId)
This commit is contained in:
parent
521af70988
commit
30f33d36de
4 changed files with 8 additions and 4 deletions
|
@ -23,6 +23,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
|
||||||
import org.matrix.android.sdk.api.query.QueryStringValue
|
import org.matrix.android.sdk.api.query.QueryStringValue
|
||||||
import org.matrix.android.sdk.api.session.Session
|
import org.matrix.android.sdk.api.session.Session
|
||||||
import org.matrix.android.sdk.api.session.events.model.toContent
|
import org.matrix.android.sdk.api.session.events.model.toContent
|
||||||
|
import org.matrix.android.sdk.api.session.getRoom
|
||||||
import org.matrix.android.sdk.api.session.room.Room
|
import org.matrix.android.sdk.api.session.room.Room
|
||||||
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
|
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
@ -33,7 +34,7 @@ class PauseVoiceBroadcastUseCase @Inject constructor(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
suspend fun execute(roomId: String) {
|
suspend fun execute(roomId: String) {
|
||||||
val room = session.roomService().getRoom(roomId) ?: return
|
val room = session.getRoom(roomId) ?: return
|
||||||
|
|
||||||
Timber.d("## PauseVoiceBroadcastUseCase: Pause voice broadcast requested")
|
Timber.d("## PauseVoiceBroadcastUseCase: Pause voice broadcast requested")
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
|
||||||
import org.matrix.android.sdk.api.query.QueryStringValue
|
import org.matrix.android.sdk.api.query.QueryStringValue
|
||||||
import org.matrix.android.sdk.api.session.Session
|
import org.matrix.android.sdk.api.session.Session
|
||||||
import org.matrix.android.sdk.api.session.events.model.toContent
|
import org.matrix.android.sdk.api.session.events.model.toContent
|
||||||
|
import org.matrix.android.sdk.api.session.getRoom
|
||||||
import org.matrix.android.sdk.api.session.room.Room
|
import org.matrix.android.sdk.api.session.room.Room
|
||||||
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
|
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
@ -33,7 +34,7 @@ class ResumeVoiceBroadcastUseCase @Inject constructor(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
suspend fun execute(roomId: String) {
|
suspend fun execute(roomId: String) {
|
||||||
val room = session.roomService().getRoom(roomId) ?: return
|
val room = session.getRoom(roomId) ?: return
|
||||||
|
|
||||||
Timber.d("## ResumeVoiceBroadcastUseCase: Resume voice broadcast requested")
|
Timber.d("## ResumeVoiceBroadcastUseCase: Resume voice broadcast requested")
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
|
||||||
import org.matrix.android.sdk.api.query.QueryStringValue
|
import org.matrix.android.sdk.api.query.QueryStringValue
|
||||||
import org.matrix.android.sdk.api.session.Session
|
import org.matrix.android.sdk.api.session.Session
|
||||||
import org.matrix.android.sdk.api.session.events.model.toContent
|
import org.matrix.android.sdk.api.session.events.model.toContent
|
||||||
|
import org.matrix.android.sdk.api.session.getRoom
|
||||||
import org.matrix.android.sdk.api.session.room.Room
|
import org.matrix.android.sdk.api.session.room.Room
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
@ -32,7 +33,7 @@ class StartVoiceBroadcastUseCase @Inject constructor(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
suspend fun execute(roomId: String) {
|
suspend fun execute(roomId: String) {
|
||||||
val room = session.roomService().getRoom(roomId) ?: return
|
val room = session.getRoom(roomId) ?: return
|
||||||
|
|
||||||
Timber.d("## StartVoiceBroadcastUseCase: Start voice broadcast requested")
|
Timber.d("## StartVoiceBroadcastUseCase: Start voice broadcast requested")
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ import im.vector.app.features.voicebroadcast.model.asVoiceBroadcastEvent
|
||||||
import org.matrix.android.sdk.api.query.QueryStringValue
|
import org.matrix.android.sdk.api.query.QueryStringValue
|
||||||
import org.matrix.android.sdk.api.session.Session
|
import org.matrix.android.sdk.api.session.Session
|
||||||
import org.matrix.android.sdk.api.session.events.model.toContent
|
import org.matrix.android.sdk.api.session.events.model.toContent
|
||||||
|
import org.matrix.android.sdk.api.session.getRoom
|
||||||
import org.matrix.android.sdk.api.session.room.Room
|
import org.matrix.android.sdk.api.session.room.Room
|
||||||
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
|
import org.matrix.android.sdk.api.session.room.model.relation.RelationDefaultContent
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
@ -33,7 +34,7 @@ class StopVoiceBroadcastUseCase @Inject constructor(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
suspend fun execute(roomId: String) {
|
suspend fun execute(roomId: String) {
|
||||||
val room = session.roomService().getRoom(roomId) ?: return
|
val room = session.getRoom(roomId) ?: return
|
||||||
|
|
||||||
Timber.d("## StopVoiceBroadcastUseCase: Stop voice broadcast requested")
|
Timber.d("## StopVoiceBroadcastUseCase: Stop voice broadcast requested")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue