Skip to content

Commit

Permalink
Merge pull request #302 from teobaranga/fix-activity-sync
Browse files Browse the repository at this point in the history
fix(activities): remove sync skip logic
  • Loading branch information
teobaranga authored Nov 28, 2024
2 parents 74e5a05 + 17e782a commit 9bbd571
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ class ContactActivitiesSynchronizer @AssistedInject constructor(
override val syncState = MutableStateFlow(Synchronizer.State.IDLE)

override suspend fun sync() {
if (!isSyncEnabled) {
return
}

syncState.value = Synchronizer.State.REFRESHING

Expand Down Expand Up @@ -88,20 +85,12 @@ class ContactActivitiesSynchronizer @AssistedInject constructor(
contactActivitiesDao.delete(activityIds)

syncState.value = Synchronizer.State.IDLE

isSyncEnabled = false
}

@AssistedFactory
interface Factory {
fun create(contactId: Int): ContactActivitiesSynchronizer
}

companion object {

// TODO: this doesn't make much sense, this Synchronizer is not a singleton
private var isSyncEnabled = true
}
}

fun ContactActivitiesResponse.ContactActivity.toEntity(): ContactActivityEntity {
Expand Down

0 comments on commit 9bbd571

Please sign in to comment.