use status source for delete and redraft (#1461)

* use status source for delete and redraft

* make delete & redraft work on Pleroma again

* add error handling
This commit is contained in:
Konrad Pozniak 2019-08-28 19:54:46 +02:00 committed by GitHub
commit 42a6b98d4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 154 additions and 88 deletions

View file

@ -115,6 +115,9 @@ class ConversationsViewModel @Inject constructor(
/* this is not ideal since deleting last toot from an conversation
should not delete the conversation but show another toot of the conversation */
timelineCases.delete(conversation.lastStatus.id)
.subscribeOn(Schedulers.io())
.doOnError { t -> Log.w("ConversationViewModel", "Failed to delete conversation", t) }
.subscribe()
database.conversationDao().delete(conversation)
.subscribeOn(Schedulers.io())
.subscribe()