Skip to content

Commit f7549de

Browse files
committed
Also fix share presenter closing the room if it's held
1 parent 9b5fa77 commit f7549de

File tree

2 files changed

+5
-2
lines changed
  • features/share/impl/src/main/kotlin/io/element/android/features/share/impl
  • libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget

2 files changed

+5
-2
lines changed

features/share/impl/src/main/kotlin/io/element/android/features/share/impl/SharePresenter.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ class SharePresenter @AssistedInject constructor(
9595
).isSuccess
9696
}
9797
.all { it }
98-
.also { room.destroy() }
98+
.also {
99+
if (activeRoomHolder.getActiveRoomMatching(matrixClient.sessionId, roomId) == null) {
100+
room.destroy()
101+
}
102+
}
99103
}
100104
.all { it }
101105
}

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/RustWidgetDriver.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ package io.element.android.libraries.matrix.impl.widget
99

1010
import io.element.android.libraries.matrix.api.widget.MatrixWidgetDriver
1111
import io.element.android.libraries.matrix.api.widget.MatrixWidgetSettings
12-
import io.element.android.libraries.matrix.impl.room.JoinedRustRoom
1312
import kotlinx.coroutines.CoroutineScope
1413
import kotlinx.coroutines.Dispatchers
1514
import kotlinx.coroutines.Job

0 commit comments

Comments
 (0)