Pebble App Framework: Phone API
    Preparing search index...

    Function seedConfigFromWatch

    • Seeds the Clay store from the watch's current settings so the config opens with the real values instead of defaults. The watch persist is the source of truth, since the phone's clay-settings can be empty or stale after an update.

      Every setting the watch sends that the settings page has an item for is seeded, in the form that item stores. A key with no item, such as the reply's own marker, is left out.

      A timezone field is the one exception. It only seeds when the phone has nothing saved for it, since the watch's copy has lost the zone the phone's still holds.

      Each feature's seeded hook then runs on the settings before they are saved, so what it sets is saved with the rest. One that throws is skipped and logged, and the settings are still saved.

      Parameters

      • messageKeys: any

        The face's message_keys map.

      • payload: any

        The watch's AppMessage payload to seed from.

      • clayConfig: ClayConfigItem[]

        The face's settings page, which says what each key holds.

      • features: FeatureHooks[] = []

        The started features, whose seeded hooks run before the save. Left out, none run.

      Returns void