SAK-23800 only call getMessages() when in the message list view(default view)

git-svn-id: https://source.sakaiproject.org/svn/announcement/trunk@127419 66ffb92e-73f9-0310-93c1-f5514f145a0a