Closed wingsum93 closed 1 year ago
When i tried other question related to code answer.
I present you another possible solution, in the path "java/com/chatgptlite/wanted/ui/common/AppDrawer.kt" An 'IconButton' is defined with a sun icon (WbSunny) inside it. When the button is clicked, currently no action is executed as the 'onClick' block is empty. To add functionality to the button, you can add code inside this onClick block.
Assuming you want to switch the app theme between light and dark when you click this button, you can do the following as an example:
In your 'MainActivity.kt', use the 'ThemeViewModel' to change the theme based on the 'isDarkTheme' value and in your 'AppDrawer.kt' file, use the 'ThemeViewModel' to update the theme's state when clicking the button
@Near707 I do not agree your approach as it is not need to write so many code to to only 1 thing.
Instead try to use local variable in compose (mutable state - boolean) , checkout #6 for detail
Contributions are welcome! @wingsum93 and @Near707, this repo doesn't get much attention so I don't have the motivation to develop it further 😢...Hope it useful for you
Contributions are welcome! @wingsum93 and @Near707, this repo doesn't get much attention so I don't have the motivation to develop it further 😢...Hope it useful for you
There are 2 selling points for this project comparing to other android chatGPT project:
So i think this project is useful for people who may want to develop chatGPT client @lambiengcode @Near707
@wingsum93 Glad to hear about that 😄. This is my first project using Jetpack Compose. I use this project for learning and practice Compose.
This issue happen when i use light theme in my phone.
I found it unable to change the text color of Markdown component. The only possible solution is to change the "BackGroundMessageGPT" to other color.