Refactored the code of modest_ui_actions_on_new_msg() and