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

    Function readText

    • Reads a text Clay setting, applying a fallback only when it was never saved.

      A text field the wearer emptied saves an empty string, and that is their choice, so it is kept. Taking the fallback for it would bring a field with a default straight back, and a cleared watchlist or calendar link could never be cleared.

      Parameters

      • value: any

        The raw Clay value, which may already be unwrapped or still wrapped.

      • fallback: string

        What to return when the value is missing.

      Returns string

      The setting as a string, or the fallback.