mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-04 02:51:09 +01:00
remove nullable from PollRepository return types
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
87fdd7017d
commit
3267fc2f47
@ -33,11 +33,11 @@ interface PollRepository {
|
||||
options: List<String>,
|
||||
resultMode: Int,
|
||||
maxVotes: Int
|
||||
): Observable<Poll>?
|
||||
): Observable<Poll>
|
||||
|
||||
fun getPoll(roomToken: String, pollId: String): Observable<Poll>?
|
||||
fun getPoll(roomToken: String, pollId: String): Observable<Poll>
|
||||
|
||||
fun vote(roomToken: String, pollId: String, options: List<Int>): Observable<Poll>?
|
||||
fun vote(roomToken: String, pollId: String, options: List<Int>): Observable<Poll>
|
||||
|
||||
fun closePoll(roomToken: String, pollId: String): Observable<Poll>?
|
||||
fun closePoll(roomToken: String, pollId: String): Observable<Poll>
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class PollRepositoryImpl(private val ncApi: NcApi, private val currentUserProvid
|
||||
resultMode: Int,
|
||||
maxVotes:
|
||||
Int
|
||||
): Observable<Poll>? {
|
||||
): Observable<Poll> {
|
||||
return ncApi.createPoll(
|
||||
credentials,
|
||||
ApiUtils.getUrlForPoll(
|
||||
@ -71,7 +71,7 @@ class PollRepositoryImpl(private val ncApi: NcApi, private val currentUserProvid
|
||||
).map { mapToPoll(it.ocs?.data!!) }
|
||||
}
|
||||
|
||||
override fun vote(roomToken: String, pollId: String, options: List<Int>): Observable<Poll>? {
|
||||
override fun vote(roomToken: String, pollId: String, options: List<Int>): Observable<Poll> {
|
||||
|
||||
return ncApi.votePoll(
|
||||
credentials,
|
||||
|
Loading…
Reference in New Issue
Block a user