Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

context.ui functions stop working after calling redis functions #112

Open
devvit-help-bot bot opened this issue Nov 11, 2024 · 0 comments
Open

context.ui functions stop working after calling redis functions #112

devvit-help-bot bot opened this issue Nov 11, 2024 · 0 comments
Labels
bug synced This issue has been added to our internal tracker

Comments

@devvit-help-bot
Copy link

Details

After calling redis functions, the context.ui commands do not work anymore.
Thus i can't do toasts and can't showForms after fetching redis.

This is not experience post. You can find the src.zip a bit lower, but this is happening in context of onSubmit of first form.

Additional info

Discord message: _ok if i put the showToast like this, then it shows. but the context.ui is still UIClient {}

    async processDescriptions(context){
        context.ui.showToast('IS THIS WORKING?')  // Appears in the UI

        let stringArray = await context.redis.hGet('youtubePoster', 'stringArray')
        let currentIndex = await context.redis.hGet('youtubePoster', 'currentIndex')
        context.ui.showToast('IS THIS WORKING?')  // DOESN't appear in the UI

        let dataArray = JSON.parse(stringArray)
        
        let [link, title, description] = dataArray[currentIndex]

        // the context.ui commands not working after calling redis; i populated the data with testing, just for  testing. But link, title and description are correct
        context.ui.showForm(descriptionEditor, {
            link: "testing",
            title: "testing1",
            description: "testing2",
        });

    },
```_

**Message author:** anonymousgenerator

**Discord link:** <https://discord.com/channels/1050224141732687912/1050227353311248404/1297984878863716363>
@pl00h pl00h added bug synced This issue has been added to our internal tracker labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug synced This issue has been added to our internal tracker
Development

No branches or pull requests

1 participant