diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ContactDetails/ContactDetailsAvatar.vue | 4 | ||||
-rw-r--r-- | src/views/Contacts.vue | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index 46e04c23..4ee26ac0 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -239,7 +239,9 @@ export default { }, updateImgSize() { - this.updateHeightWidth(this.$refs.img.naturalHeight, this.$refs.img.naturalWidth) + if (this.contact.photo) { + this.updateHeightWidth(this.$refs.img.naturalHeight, this.$refs.img.naturalWidth) + } }, /** * Updates the current height and width data diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue index ce4ba79e..af5960a6 100644 --- a/src/views/Contacts.vue +++ b/src/views/Contacts.vue @@ -74,6 +74,8 @@ import { AppNavigationSettings, Modal } from 'nextcloud-vue' +import isMobile from 'nextcloud-vue/dist/Mixins/isMobile' + import moment from 'moment' import download from 'downloadjs' import { VCardTime } from 'ical.js' @@ -107,6 +109,10 @@ export default { Modal }, + mixins: [ + isMobile + ], + // passed by the router props: { selectedGroup: { @@ -123,9 +129,7 @@ export default { data() { return { loading: true, - searchQuery: '', - // are we in mobile mode - isMobile: window.outerWidth <= 768 + searchQuery: '' } }, |