mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-15 05:01:45 +03:00
use safe call operator
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
2da78f69f2
commit
fdbff4a8e6
1 changed files with 15 additions and 13 deletions
|
@ -176,19 +176,21 @@ 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 ->
|
||||||
if (backupStatus.message != null) {
|
backupStatus = status
|
||||||
isBackupStatusAvailable = true
|
if (backupStatus.message != null) {
|
||||||
val backupPredefinedStatus = PredefinedStatus(
|
isBackupStatusAvailable = true
|
||||||
backupStatus.userId!!,
|
val backupPredefinedStatus = PredefinedStatus(
|
||||||
backupStatus.icon,
|
backupStatus.userId!!,
|
||||||
backupStatus.message!!,
|
backupStatus.icon,
|
||||||
ClearAt(type = "period", time = backupStatus.clearAt.toString())
|
backupStatus.message!!,
|
||||||
)
|
ClearAt(type = "period", time = backupStatus.clearAt.toString())
|
||||||
binding.automaticStatus.visibility = View.VISIBLE
|
)
|
||||||
adapter.isBackupStatusAvailable = true
|
binding.automaticStatus.visibility = View.VISIBLE
|
||||||
predefinedStatusesList.add(0, backupPredefinedStatus)
|
adapter.isBackupStatusAvailable = true
|
||||||
adapter.notifyDataSetChanged()
|
predefinedStatusesList.add(0, backupPredefinedStatus)
|
||||||
|
adapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue