-
Notifications
You must be signed in to change notification settings - Fork 927
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
[WIP] Add AI Chat Entry Point #5415
base: develop
Are you sure you want to change the base?
Conversation
9ba9628
to
eaca222
Compare
eaca222
to
faa5cbc
Compare
moshi.adapter(DuckChatSettingJson::class.java) | ||
} | ||
|
||
override fun isEnabled(): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it suspend and directly assign dispatchers.io()
override fun isEnabled(): Boolean { | |
override suspend fun isEnabled(): Boolean = withContext(dispatchers.io()) = { |
} | ||
} | ||
|
||
override fun showInBrowserMenu(): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it suspend and assign dispatchers.io()
.stateIn(appCoroutineScope, SharingStarted.Eagerly, true) | ||
|
||
override suspend fun setShowInBrowserMenu(showDuckChat: Boolean) { | ||
store.edit { prefs -> prefs[DUCK_CHAT_SHOW_IN_MENU] = showDuckChat } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what thread is the block inside store.edit{} executed?
Task/Issue URL:
Description
Steps to test this PR
Feature 1
UI changes