Skip to content

Tweaks don't show up until they've been read in the app #21

@hofmanntm

Description

@hofmanntm

Ideally, launching the app and shaking device should give you access to all available tweaks. However, only tweaks whose value has already been read by the app show up.

In order to combat this in my projects, I've sort of listed all the tweaks in a tweak initialization step, where I just print them out. So if there is no good way to make this happen automatically, we should add some documentation about how to "list" the tweaks in an initialization step that ensure that they show up.

Here's what I have in one of my projects:

object TweakInitializer {
    // Ensures that we can modify tweaks before they're read.
    @SuppressLint("LogNotTimber")
    fun initTweaks() {
        Log.d(
            "Tweaks",
            "Initializing: ${OnboardingTweaks.alwaysShowVisibility}"
        )
        Log.d(
            "Tweaks",
            "Initializing ${DebuggingTweaks.diagnosticLevel}"
        )
        Log.d(
            "Tweaks",
            "Initializing ${BillingTweaks.alwaysUpdateUserPurchases}"
        )
        Log.d(
            "Tweaks",
            "Initializing ${BillingTweaks.allowArchivedPurchases}"
        )
    }
}

to ensure that these tweaks can be accessed and modified before their value is used by the program.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions