mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-09 15:42:10 +00:00
Switch to active user in CallNotificationActivity
There are no known bugs that were caused by not setting the active user here, but this should be done.
See fb7ea25b
for reference
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
fb7ea25b9d
commit
fcb4ee0430
@ -43,6 +43,7 @@ import com.nextcloud.talk.extensions.loadAvatar
|
||||
import com.nextcloud.talk.models.json.conversations.Conversation
|
||||
import com.nextcloud.talk.models.json.conversations.RoomOverall
|
||||
import com.nextcloud.talk.models.json.participants.Participant
|
||||
import com.nextcloud.talk.users.UserManager
|
||||
import com.nextcloud.talk.utils.ApiUtils
|
||||
import com.nextcloud.talk.utils.NotificationUtils
|
||||
import com.nextcloud.talk.utils.ParticipantPermissions
|
||||
@ -73,6 +74,9 @@ class CallNotificationActivity : CallBaseActivity() {
|
||||
@Inject
|
||||
var cache: Cache? = null
|
||||
|
||||
@Inject
|
||||
lateinit var userManager: UserManager
|
||||
|
||||
private val disposablesList: MutableList<Disposable> = ArrayList()
|
||||
private var originalBundle: Bundle? = null
|
||||
private var roomToken: String? = null
|
||||
@ -98,13 +102,16 @@ class CallNotificationActivity : CallBaseActivity() {
|
||||
userBeingCalled = extras.getParcelable(KEY_USER_ENTITY)
|
||||
originalBundle = extras
|
||||
credentials = ApiUtils.getCredentials(userBeingCalled!!.username, userBeingCalled!!.token)
|
||||
setCallDescriptionText()
|
||||
if (currentConversation == null) {
|
||||
handleFromNotification()
|
||||
} else {
|
||||
setUpAfterConversationIsKnown()
|
||||
|
||||
if (userManager.setUserAsActive(userBeingCalled!!).blockingGet()) {
|
||||
setCallDescriptionText()
|
||||
if (currentConversation == null) {
|
||||
handleFromNotification()
|
||||
} else {
|
||||
setUpAfterConversationIsKnown()
|
||||
}
|
||||
initClickListeners()
|
||||
}
|
||||
initClickListeners()
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
|
Loading…
Reference in New Issue
Block a user