move diaobject#viewAppended impl to a listener