summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-04-03 12:31:35 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-04-03 12:31:35 +0200
commit80cfc893111cf62e15d78ce23edd7673156620e1 (patch)
treeb0c375fd04ffa712c9a38c9925060b7169024bcb /src
parent84c1d532a633cb9e3f570297ab30fe7ae121edb2 (diff)
Use isMobile mixin
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/ContactDetails/ContactDetailsAvatar.vue4
-rw-r--r--src/views/Contacts.vue10
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: ''
}
},