Visibility not updating

I have a chat screen where a list auto-refreshes correctly whenever the database updates. However, I want a button to appear based on a specific condition in the database. The button’s visibility doesn’t update automatically unless I manually refresh the screen. Is there a way to ensure the button’s visibility updates in real-time without requiring a manual screen refresh?