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
Originally posted by MalayAgr December 10, 2024
I have a scenario where I want to make the ChatHistory class an observable so that other classes can subscribe to changes in the ChatHistory. The extended class would notify the subscribers whenever a message is added to the ChatHistory.
Unfortunately, I just realised that none of the methods used to add messages to the ChatHistory are virtual and hence, cannot be overridden. I was hoping to leverage polymorphism so that the rest of my code doesn't need to change and I can use this observable ChatHistory and the usual ChatHistory class interchangeably.
How can I achieve this?
The text was updated successfully, but these errors were encountered:
Discussed in #9931
Originally posted by MalayAgr December 10, 2024
I have a scenario where I want to make the ChatHistory class an observable so that other classes can subscribe to changes in the ChatHistory. The extended class would notify the subscribers whenever a message is added to the ChatHistory.
Unfortunately, I just realised that none of the methods used to add messages to the ChatHistory are virtual and hence, cannot be overridden. I was hoping to leverage polymorphism so that the rest of my code doesn't need to change and I can use this observable ChatHistory and the usual ChatHistory class interchangeably.
How can I achieve this?
The text was updated successfully, but these errors were encountered: