Fix app ordering for activity and gallery

 * refs owncloud/core#4324
Merge pull request #1402 from owncloud/fix_app_ordering

Fix app ordering for activity and gallery