I use a snackbar to notify the users of my app that they aren't connected to the internet. I added a "retry" action to the snackbar which re-checks the connection. I want the snackbar to stay displayed until I dismiss it myself (when an internet connection is found), but I can't get this to work. Whenever I click on the action, the snackbar dismisses.
I've set the duration to indefinite and the snackbar does stay open indefinitely but it dismisses when I click on the action.
I've read online that dismissing the snackbar automatically after clicking on the action hasn't always been the default behavior.
edit:
I feel like my question might be badly phrased. I have a snackbar with an action but I don't want the snackbar to close when the action is executed, which it automatically does atm.