Is there any way to do
window.location.reload() on MM desktop to simulate Cmd+R action?
I develop plugin for MM and I want have a button that reloads page in plugin’s ErrorBoundary. To not confuse user with blank white screen.
On web it works perfect, but on desktop app it does nothing.
Hi pippin and welcome to the Mattermost forums!
I forwarded your message to the developers and got the following response:
No, we specifically don’t allow plugins or any webapp code to call desktop functionality wherever possible. This would require some desktop code to do.
For now, calling
window.location.reload() is all you can do, and the white screen would have to be a consequence of that.
I’d like to understand more why we need to refresh the page however. Maybe there’s another way to do this.
Can you answer this question?
thanks for the answer. I had a case with uploading new version of plugin. New code conflicted with store old state. It’s infrequent situation, so your answer is ok for me. I’m just new to MM and was curious.
Thank you for help.
Alright, during a plugin upgrade it’s sometimes necessary to reload the screen (depending on the plugin), but this should not be part of the normal day-to-day operations when using your plugin I guess.