Skip to content

Commit

Permalink
Fix snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
sunkup committed Sep 30, 2024
1 parent 972493e commit ed2a6d5
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ class AccountSettingsModel @AssistedInject constructor(

val accountSettings = accountSettingsFactory.create(account)
Snapshot.withMutableSnapshot {

// TODO: context does not seem to work in snapshot (also used in getSyncInterval)
// TODO: maybe we don't need to take a snapshot on a background thread?
syncIntervalContacts = accountSettings.getSyncInterval(context.getString(R.string.address_books_authority))
syncIntervalCalendars = accountSettings.getSyncInterval(CalendarContract.AUTHORITY)
syncIntervalTasks = tasksProvider?.let { accountSettings.getSyncInterval(it.authority) }
Expand Down

0 comments on commit ed2a6d5

Please sign in to comment.