mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
minor refactoring
to be discussed: does it make sense to show a dialog instead? At least when it's created via 1:1 conversation Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
e7ab3aab0d
commit
c2ad89f7fb
@ -1598,22 +1598,18 @@ class ChatActivity :
|
|||||||
private fun switchToRoom(token: String, startCallAfterRoomSwitch: Boolean, isVoiceOnlyCall: Boolean) {
|
private fun switchToRoom(token: String, startCallAfterRoomSwitch: Boolean, isVoiceOnlyCall: Boolean) {
|
||||||
if (conversationUser != null) {
|
if (conversationUser != null) {
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
if (currentConversation?.objectType == ConversationEnums.ObjectType.ROOM) {
|
val toastInfo = if (currentConversation?.objectType == ConversationEnums.ObjectType.ROOM) {
|
||||||
// do not replace with snackbar, as it would disappear with the activity switch
|
context.resources.getString(R.string.switch_to_main_room)
|
||||||
Toast.makeText(
|
|
||||||
context,
|
|
||||||
context.resources.getString(R.string.switch_to_main_room),
|
|
||||||
Toast.LENGTH_LONG
|
|
||||||
).show()
|
|
||||||
} else {
|
} else {
|
||||||
|
context.resources.getString(R.string.switch_to_breakout_room)
|
||||||
|
}
|
||||||
// do not replace with snackbar, as it would disappear with the activity switch
|
// do not replace with snackbar, as it would disappear with the activity switch
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
context,
|
context,
|
||||||
context.resources.getString(R.string.switch_to_breakout_room),
|
toastInfo,
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show()
|
).show()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
bundle.putString(KEY_ROOM_TOKEN, token)
|
bundle.putString(KEY_ROOM_TOKEN, token)
|
||||||
|
Loading…
Reference in New Issue
Block a user