Commit fad198c5 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Checks device OS version before starting video conference due to an internal library bug.

parent e9058da0
package chat.rocket.android.chatroom.presentation
import android.os.Build
import android.widget.Toast
import chat.rocket.android.R
import chat.rocket.android.chatdetails.ui.TAG_CHAT_DETAILS_FRAGMENT
import chat.rocket.android.chatinformation.ui.messageInformationIntent
......@@ -24,7 +26,16 @@ class ChatRoomNavigator(internal val activity: ChatRoomActivity) {
}
fun toVideoConference(chatRoomId: String, chatRoomType: String) {
// TODO: Jitsi isn't working with Android M- version. We need to remove the condition bellow after it's solved. (https://github.com/jitsi/jitsi-meet/pull/3967)/
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
activity.startActivity(activity.videoConferenceIntent(chatRoomId, chatRoomType))
} else {
Toast.makeText(
activity,
"Sorry, unable to open the video conference due to device configuration",
Toast.LENGTH_SHORT
).show()
}
}
fun toChatRoom(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment