You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, great product, love it, amazing job you did. I had created a Chat app but your system allows for so much more features that I decided to abandon my development and integrate ChatUI.
It works perfectly when I set the ChatConfiguration with a userID of my choice but I have troubles creating that same configuration when the user logs in on my database which stores users, messages, etc..
I tried to initialise the ChatConfiguration in the User class I created and then pass the User object as environmentObject so that the configuration is setup when the user logs in and passed along with my "global" user object in the view.
Unfortunately, the MessageList view takes the configuration from the configuration object directly in the code and not from user.configuration I created and I cannot change your code without forking, which I'd like to avoid.
What I'd like to do is create the ChatConfiguration(user_logged.userID, user_logged.giphyKey) when the user has successfully logged in and pass it as environmentObject but it doesn't work as I cannot change the ChatConfiguration once it's created (userId is a constant) and I cannot even declare configuration has a variable that can be initialized later using "?", I get the error "requires that ChatConfiguration? conform to ObservableObject".
So I'm stuck, I tried so many things of all sorts, probably my knowledge of SwiftUI is too limited but I just can't figure out what to do.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
First of all, great product, love it, amazing job you did. I had created a Chat app but your system allows for so much more features that I decided to abandon my development and integrate ChatUI.
It works perfectly when I set the ChatConfiguration with a userID of my choice but I have troubles creating that same configuration when the user logs in on my database which stores users, messages, etc..
I tried to initialise the ChatConfiguration in the User class I created and then pass the User object as environmentObject so that the configuration is setup when the user logs in and passed along with my "global" user object in the view.
Unfortunately, the MessageList view takes the configuration from the configuration object directly in the code and not from user.configuration I created and I cannot change your code without forking, which I'd like to avoid.
What I'd like to do is create the ChatConfiguration(user_logged.userID, user_logged.giphyKey) when the user has successfully logged in and pass it as environmentObject but it doesn't work as I cannot change the ChatConfiguration once it's created (userId is a constant) and I cannot even declare configuration has a variable that can be initialized later using "?", I get the error "requires that ChatConfiguration? conform to ObservableObject".
So I'm stuck, I tried so many things of all sorts, probably my knowledge of SwiftUI is too limited but I just can't figure out what to do.
Can you help me please?
Regards
Nico
Beta Was this translation helpful? Give feedback.
All reactions