fix some document share state change issues, and partially optimize showing / hiding the sharebar
Merge branch 'document_paging' into testing