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