From b44afc1876d297bf3bc3a307145bf69f0c852d18 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 21 May 2019 17:39:23 +0900 Subject: [PATCH] =?UTF-8?q?iOS=E3=81=A7=E6=8A=95=E7=A8=BF=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=A0=E3=81=AB=E8=87=AA=E5=8B=95=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=82=AB=E3=82=B9=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/mobile/script.ts | 12 ++++++------ src/client/app/mobile/views/components/post-form.vue | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/client/app/mobile/script.ts b/src/client/app/mobile/script.ts index d33bafbb0f..7a80f21759 100644 --- a/src/client/app/mobile/script.ts +++ b/src/client/app/mobile/script.ts @@ -25,6 +25,7 @@ import MkShare from '../common/views/pages/share.vue'; import MkFollow from '../common/views/pages/follow.vue'; import MkNotFound from '../common/views/pages/not-found.vue'; import DeckColumn from '../common/views/deck/deck.column-template.vue'; +import PostFormDialog from './views/components/post-form-dialog.vue'; import FileChooser from './views/components/drive-file-chooser.vue'; import FolderChooser from './views/components/drive-folder-chooser.vue'; @@ -50,16 +51,15 @@ init((launch, os) => { document.documentElement.style.overflow = 'auto'; } - this.$root.newAsync(() => import('./views/components/post-form-dialog.vue').then(m => m.default), { + const vm = this.$root.new(PostFormDialog, { reply: o.reply, mention: o.mention, renote: o.renote - }).then(vm => { - vm.$once('cancel', recover); - vm.$once('posted', recover); - if (o.cb) vm.$once('closed', o.cb); - (vm as any).focus(); }); + vm.$once('cancel', recover); + vm.$once('posted', recover); + if (o.cb) vm.$once('closed', o.cb); + (vm as any).focus(); }, $chooseDriveFile(opts) { diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index 815122b28e..85246036a2 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -59,12 +59,11 @@ import { erase, unique } from '../../../../../prelude/array'; import { length } from 'stringz'; import { toASCII } from 'punycode'; import extractMentions from '../../../../../misc/extract-mentions'; -import XPostFormAttaches from '../../../common/views/components/post-form-attaches.vue'; export default Vue.extend({ i18n: i18n('mobile/views/components/post-form.vue'), components: { - XPostFormAttaches, + XPostFormAttaches: () => import('../../../common/views/components/post-form-attaches.vue').then(m => m.default), XPollEditor: () => import('../../../common/views/components/poll-editor.vue').then(m => m.default) },