mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
fixes - #3559 - Failed to send thanks" notification, but thank actually sent successfully
I create another Model Class->"MwThankPostResponse.java" to store the Result of Post Request POST(MW_API_PREFIX+"action=thank")
This commit is contained in:
parent
8384ad03dc
commit
944bede42d
3 changed files with 41 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ class ThanksClient @Inject constructor(
|
|||
fun thank(revisionId: Long): Observable<Boolean> {
|
||||
return try {
|
||||
service.thank(revisionId.toString(), null, csrfTokenClient.tokenBlocking, CommonsApplication.getInstance().userAgent)
|
||||
.map { mwQueryResponse -> mwQueryResponse.successVal == 1 }
|
||||
.map { mwThankPostResponse -> mwThankPostResponse.result.success== 1 }
|
||||
} catch (throwable: Throwable) {
|
||||
Observable.just(false)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue