mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
replace snackbar with toasts for breakout room infos
snackbars disaapear with the switch to a different screen. Toasts survive the switch so they are visible during the activities switch Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
190bdbb470
commit
c9136cdf15
@ -45,6 +45,7 @@ import android.widget.ImageView
|
|||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import android.widget.PopupMenu
|
import android.widget.PopupMenu
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
import android.widget.Toast
|
||||||
import androidx.activity.OnBackPressedCallback
|
import androidx.activity.OnBackPressedCallback
|
||||||
import androidx.activity.result.ActivityResult
|
import androidx.activity.result.ActivityResult
|
||||||
import androidx.activity.result.ActivityResultLauncher
|
import androidx.activity.result.ActivityResultLauncher
|
||||||
@ -1598,16 +1599,18 @@ class ChatActivity :
|
|||||||
if (conversationUser != null) {
|
if (conversationUser != null) {
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
if (currentConversation?.objectType == ConversationEnums.ObjectType.ROOM) {
|
if (currentConversation?.objectType == ConversationEnums.ObjectType.ROOM) {
|
||||||
Snackbar.make(
|
// do not replace with snackbar, as it would disappear with the activity switch
|
||||||
binding.root,
|
Toast.makeText(
|
||||||
|
context,
|
||||||
context.resources.getString(R.string.switch_to_main_room),
|
context.resources.getString(R.string.switch_to_main_room),
|
||||||
Snackbar.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show()
|
).show()
|
||||||
} else {
|
} else {
|
||||||
Snackbar.make(
|
// do not replace with snackbar, as it would disappear with the activity switch
|
||||||
binding.root,
|
Toast.makeText(
|
||||||
|
context,
|
||||||
context.resources.getString(R.string.switch_to_breakout_room),
|
context.resources.getString(R.string.switch_to_breakout_room),
|
||||||
Snackbar.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show()
|
).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user