Update ui.js

Reordered _destroyView to fix notifications not being ignored on .refreshView().