mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-14 00:05:04 +01:00
format
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
9fbb3886ab
commit
7a63a645fe
@ -52,7 +52,7 @@ class PredefinedStatusViewHolder(private val binding: PredefinedStatusBinding) :
|
||||
if (position == 0) {
|
||||
binding.clearAt.text = context.getString(R.string.previously_set)
|
||||
}
|
||||
binding.resetStatusButton.setOnClickListener{
|
||||
binding.resetStatusButton.setOnClickListener {
|
||||
clickListener.revertStatus()
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,6 @@ class SetStatusDialogFragment :
|
||||
private lateinit var popup: EmojiPopup
|
||||
private var isBackupStatusAvailable = false
|
||||
|
||||
|
||||
@Inject
|
||||
lateinit var ncApi: NcApi
|
||||
|
||||
@ -284,8 +283,11 @@ class SetStatusDialogFragment :
|
||||
}
|
||||
}
|
||||
|
||||
override fun revertStatus(){
|
||||
ncApi.revertStatus(credentials, ApiUtils.getUrlForRevertStatus(currentUser?.baseUrl!!, currentStatus?.messageId))
|
||||
override fun revertStatus() {
|
||||
ncApi.revertStatus(
|
||||
credentials,
|
||||
ApiUtils.getUrlForRevertStatus(currentUser?.baseUrl!!, currentStatus?.messageId)
|
||||
)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : Observer<GenericOverall> {
|
||||
@ -294,9 +296,9 @@ class SetStatusDialogFragment :
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun onNext(genericOverall:GenericOverall) {
|
||||
Log.d(TAG,"$genericOverall")
|
||||
if(genericOverall.ocs?.meta?.statusCode == 200){
|
||||
override fun onNext(genericOverall: GenericOverall) {
|
||||
Log.d(TAG, "$genericOverall")
|
||||
if (genericOverall.ocs?.meta?.statusCode == 200) {
|
||||
Snackbar.make(
|
||||
binding.root,
|
||||
R.string.status_reverted,
|
||||
@ -316,8 +318,6 @@ class SetStatusDialogFragment :
|
||||
override fun onComplete() {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun setupGeneralStatusOptions() {
|
||||
|
@ -487,7 +487,7 @@ object ApiUtils {
|
||||
return "$baseUrl$OCS_API_VERSION/apps/user_status/api/v1/statuses/_$userId"
|
||||
}
|
||||
|
||||
fun getUrlForRevertStatus(baseUrl:String, messageId:String?):String{
|
||||
fun getUrlForRevertStatus(baseUrl: String, messageId: String?): String {
|
||||
return "$baseUrl$OCS_API_VERSION/apps/user_status/api/v1/user_status/revert/$messageId"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user