From 02472005967baf3da66cf09bd55251bc697d2179 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 23 Feb 2018 04:01:22 +0900 Subject: [PATCH] :v: --- .../app/common/views/components/messaging-room.vue | 13 +++++++++++-- src/web/app/desktop/views/pages/messaging-room.vue | 4 ++++ src/web/app/mobile/style.styl | 8 ++++++++ src/web/app/mobile/views/components/ui.vue | 7 +++++++ src/web/app/mobile/views/pages/messaging-room.vue | 2 +- 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/web/app/common/views/components/messaging-room.vue b/src/web/app/common/views/components/messaging-room.vue index cfb1e23acf..7af6b3fae3 100644 --- a/src/web/app/common/views/components/messaging-room.vue +++ b/src/web/app/common/views/components/messaging-room.vue @@ -116,7 +116,9 @@ export default Vue.extend({ if (isBottom) { // Scroll to bottom - this.scrollToBottom(); + this.$nextTick(() => { + this.scrollToBottom(); + }); } else if (message.user_id != (this as any).os.i.id) { // Notify this.notify('%i18n:common.tags.mk-messaging-room.new-message%'); @@ -132,7 +134,7 @@ export default Vue.extend({ }); }, isBottom() { - const asobi = 32; + const asobi = 64; const current = this.isNaked ? window.scrollY + window.innerHeight : this.$el.scrollTop + this.$el.offsetHeight; @@ -179,9 +181,16 @@ export default Vue.extend({ diff --git a/src/web/app/mobile/style.styl b/src/web/app/mobile/style.styl index 63e4f2349f..81912a2483 100644 --- a/src/web/app/mobile/style.styl +++ b/src/web/app/mobile/style.styl @@ -5,3 +5,11 @@ top auto bottom 15px left 15px + +html + height 100% + +body + display flex + flex-direction column + min-height 100% diff --git a/src/web/app/mobile/views/components/ui.vue b/src/web/app/mobile/views/components/ui.vue index 54b8a2d0d3..fbe80e8c2b 100644 --- a/src/web/app/mobile/views/components/ui.vue +++ b/src/web/app/mobile/views/components/ui.vue @@ -63,5 +63,12 @@ export default Vue.extend({ diff --git a/src/web/app/mobile/views/pages/messaging-room.vue b/src/web/app/mobile/views/pages/messaging-room.vue index a653145c10..eb5439915a 100644 --- a/src/web/app/mobile/views/pages/messaging-room.vue +++ b/src/web/app/mobile/views/pages/messaging-room.vue @@ -4,7 +4,7 @@ - +