Add check for KEEP_ALIVE job state to allow for re-submission.

This commit is contained in:
Alex Hart
2024-08-16 15:52:09 -03:00
committed by mtang-signal
parent b7e9446cde
commit 1f8481d287
3 changed files with 13 additions and 20 deletions

View File

@@ -286,19 +286,6 @@ class InAppPaymentTable(context: Context, databaseHelper: SignalDatabase) : Data
.run()
}
/**
* Returns whether there are any pending donations in the database.
*/
fun hasPending(type: InAppPaymentType): Boolean {
return readableDatabase.exists(TABLE_NAME)
.where(
"$STATE = ? AND $TYPE = ?",
State.serialize(State.PENDING),
InAppPaymentType.serialize(type)
)
.run()
}
/**
* Retrieves from the database the latest payment of the given type that is either in the PENDING or WAITING_FOR_AUTHORIZATION state.
*/