save dialogs state.