fix deleted status reappearing in the timeline (#1225)

* fix deleted status reappearing in the timeline

* fix crash

* fix tests

* fix instrumented tests

* add test for deleted status in timeline
This commit is contained in:
Konrad Pozniak 2019-05-01 22:10:00 +02:00 committed by GitHub
commit cb82202d4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 7 deletions

View file

@ -144,6 +144,11 @@ class TimelineRepositoryImpl(
}
Single.fromCallable {
if(statuses.isNotEmpty()) {
timelineDao.deleteRange(accountId, statuses.last().id, statuses.first().id)
}
for (status in statuses) {
timelineDao.insertInTransaction(
status.toEntity(accountId, htmlConverter, gson),