<commit_before>package mil.nga.giat.mage.observation.sync

import android.content.Context
import mil.nga.giat.mage.sdk.datastore.observation.Observation
import mil.nga.giat.mage.sdk.datastore.observation.ObservationHelper
import mil.nga.giat.mage.sdk.event.IObservationEventListener

class ObservationSyncListener(
   val context: Context,
   val onSync : () -> Unit
): IObservationEventListener {

   init {
      ObservationHelper.getInstance(context).addListener(this)
      onSync()
   }

   override fun onObservationCreated(
      observations: MutableCollection<Observation>?,
      sendUserNotifcations: Boolean?
   ) {
      onSync()
   }

   override fun onObservationUpdated(observation: Observation?) {
      onSync()
   }

   override fun onObservationDeleted(observation: Observation?) {}
   override fun onError(error: Throwable?) {}
}<commit_msg>update method name<commit_after>package mil.nga.giat.mage.observation.sync

import android.content.Context
import mil.nga.giat.mage.sdk.datastore.observation.Observation
import mil.nga.giat.mage.sdk.datastore.observation.ObservationHelper
import mil.nga.giat.mage.sdk.event.IObservationEventListener

class ObservationSyncListener(
   val context: Context,
   val sync : () -> Unit
): IObservationEventListener {

   init {
      ObservationHelper.getInstance(context).addListener(this)
      sync()
   }

   override fun onObservationCreated(
      observations: MutableCollection<Observation>?,
      sendUserNotifcations: Boolean?
   ) {
      sync()
   }

   override fun onObservationUpdated(observation: Observation?) {
      sync()
   }

   override fun onObservationDeleted(observation: Observation?) {}
   override fun onError(error: Throwable?) {}
}
{'fraction_non_alphanumeric': 0.09877977919814061, 'fraction_numerical': 0.0, 'mean_word_length': 4.26605504587156, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4827021', 'n_tokens_mistral': 525, 'n_tokens_neox': 513, 'n_words': 88}