Fix call log clear history error handling.

This commit is contained in:
Alex Hart
2023-09-25 15:00:35 -03:00
committed by Cody Henthorne
parent e7b18bd3a2
commit fde0f3bba1

View File

@@ -86,6 +86,10 @@ class CallLogRepository(
/**
* Delete all call events / unowned links and enqueue clear history job, and then
* emit a clear history message.
*
* This explicitly drops failed call link revocations of call links, and those call links
* will remain visible to the user. This is safe because the clear history sync message should
* only clear local history and then poll link status from the server.
*/
fun deleteAllCallLogsOnOrBeforeNow(): Single<Int> {
return Single.fromCallable {
@@ -97,7 +101,7 @@ class CallLogRepository(
}
SignalDatabase.callLinks.getAllAdminCallLinksExcept(emptySet())
}.flatMap(this::revokeAndCollectResults).map { -1 }.subscribeOn(Schedulers.io())
}.flatMap(this::revokeAndCollectResults).map { 0 }.subscribeOn(Schedulers.io())
}
/**