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

    Function wrapStoredConfig

    • Puts the saved settings back in the shape the settings page hands Clay on a save, so a restore sends the same dict a save does.

      Clay stores each setting as a bare value, and getSettings reads the page's { value } wrapper off anything that is an object. So every value goes back in a wrapper, which keeps an array such as a checkboxgroup's whole, and a slider's wrapper carries the precision Clay scales it up by.

      Only the settings the face still has a message key for are kept. A name the face has since renamed or dropped has no key, and Clay would send it under one called undefined0.

      Parameters

      • config: Record<string, any>

        The settings as Clay stored them.

      • clayConfig: ClayConfigItem[]

        The face's settings page, which holds each slider's step.

      • messageKeys: any

        The face's message_keys map.

      Returns Record<string, any>

      The settings wrapped the way the settings page returns them.