mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-15 21:22:00 +03:00
Merge pull request #4479 from nextcloud/bug_when_no_previous_user_status_set
Unable to change user status during a call
This commit is contained in:
commit
996720bf13
2 changed files with 16 additions and 13 deletions
|
@ -18,7 +18,6 @@ import com.nextcloud.talk.chat.data.network.ChatNetworkDataSource
|
||||||
import com.nextcloud.talk.data.user.model.User
|
import com.nextcloud.talk.data.user.model.User
|
||||||
import com.nextcloud.talk.models.domain.ConversationModel
|
import com.nextcloud.talk.models.domain.ConversationModel
|
||||||
import com.nextcloud.talk.models.json.capabilities.SpreedCapability
|
import com.nextcloud.talk.models.json.capabilities.SpreedCapability
|
||||||
import com.nextcloud.talk.models.json.generic.GenericOverall
|
|
||||||
import com.nextcloud.talk.models.json.participants.TalkBan
|
import com.nextcloud.talk.models.json.participants.TalkBan
|
||||||
import com.nextcloud.talk.repositories.conversations.ConversationsRepository
|
import com.nextcloud.talk.repositories.conversations.ConversationsRepository
|
||||||
import com.nextcloud.talk.utils.ApiUtils
|
import com.nextcloud.talk.utils.ApiUtils
|
||||||
|
|
|
@ -176,18 +176,22 @@ class SetStatusDialogFragment :
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun onNext(statusOverall: StatusOverall) {
|
override fun onNext(statusOverall: StatusOverall) {
|
||||||
if (statusOverall.ocs?.meta?.statusCode == HTTP_STATUS_CODE_OK) {
|
if (statusOverall.ocs?.meta?.statusCode == HTTP_STATUS_CODE_OK) {
|
||||||
backupStatus = statusOverall.ocs?.data!!
|
statusOverall.ocs?.data?.let { status ->
|
||||||
isBackupStatusAvailable = true
|
backupStatus = status
|
||||||
val backupPredefinedStatus = PredefinedStatus(
|
if (backupStatus.message != null) {
|
||||||
backupStatus.userId!!,
|
isBackupStatusAvailable = true
|
||||||
backupStatus.icon,
|
val backupPredefinedStatus = PredefinedStatus(
|
||||||
backupStatus.message!!,
|
backupStatus.userId!!,
|
||||||
ClearAt(type = "period", time = backupStatus.clearAt.toString())
|
backupStatus.icon,
|
||||||
)
|
backupStatus.message!!,
|
||||||
binding.automaticStatus.visibility = View.VISIBLE
|
ClearAt(type = "period", time = backupStatus.clearAt.toString())
|
||||||
adapter.isBackupStatusAvailable = true
|
)
|
||||||
predefinedStatusesList.add(0, backupPredefinedStatus)
|
binding.automaticStatus.visibility = View.VISIBLE
|
||||||
adapter.notifyDataSetChanged()
|
adapter.isBackupStatusAvailable = true
|
||||||
|
predefinedStatusesList.add(0, backupPredefinedStatus)
|
||||||
|
adapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue