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

Remove getMaterial3ThemeAsync() #18

Open
Aimarekin opened this issue Jan 30, 2025 · 2 comments
Open

Remove getMaterial3ThemeAsync() #18

Aimarekin opened this issue Jan 30, 2025 · 2 comments

Comments

@Aimarekin
Copy link

getMaterial3ThemeAsync() is a promise-wrapped version of getMaterial3Theme() which is otherwise functionally identical. The Kotlin module definition also just defines getSystemThemeAsync as identical to getSystemTheme.

Seeing at the code's history, I haven't found a reason to be for these async functions. Commit d32fe22 seems to have introduced it, exactly as it is now. Perhaps it was a mistake?

@pchmn
Copy link
Owner

pchmn commented Feb 4, 2025

AsyncFunction in expo modules are used to run js functions on different thread than the main one : https://docs.expo.dev/modules/module-api/#asyncfunction

So it's not really just a promise-wrapped version of getMaterial3Theme().

I should put some doc on it

@Aimarekin
Copy link
Author

@pchmn Oh alright, I didn't know about that - thanks. Some docs would be nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants