#1012 - Show video attachments

This commit is contained in:
Moez Bhatti
2018-04-20 16:51:02 -04:00
parent 510a9d23b5
commit dcbae53112
17 changed files with 163 additions and 35 deletions
+1 -3
View File
@@ -18,7 +18,6 @@
*/
package interactor
import androidx.net.toUri
import io.reactivex.Flowable
import repository.ImageRepository
import repository.MessageRepository
@@ -32,8 +31,7 @@ class SaveImage @Inject constructor(
override fun buildObservable(params: Long): Flowable<*> {
return Flowable.just(params)
.map { partId -> messageRepo.getPart(partId) }
.map { part -> part.image }
.map { uriString -> uriString.toUri() }
.map { part -> part.getUri() }
.doOnNext { uri -> imageRepository.saveImage(uri) }
}