mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Add check for KEEP_ALIVE job state to allow for re-submission.
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user