mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
if a local google event was deleted after inserting while offline, forget it
This commit is contained in:
@ -39,12 +39,16 @@ class GoogleSyncQueueDB private constructor(val context: Context) : SQLiteOpenHe
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun addOperation(eventId: Int, operation: Int) {
|
fun addOperation(eventId: Int, operation: Int) {
|
||||||
|
val hadInsertOperation = getOperationOf(eventId)?.operation?.equals(OPERATION_INSERT) == true
|
||||||
if (operation == OPERATION_DELETE) {
|
if (operation == OPERATION_DELETE) {
|
||||||
clearOperationsOf(eventId)
|
clearOperationsOf(eventId)
|
||||||
|
if (hadInsertOperation) {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (operation == OPERATION_UPDATE) {
|
if (operation == OPERATION_UPDATE) {
|
||||||
if (getOperationOf(eventId)?.operation?.equals(OPERATION_INSERT) == true) {
|
if (hadInsertOperation) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user