From f4bdbf76917ba1eb36586ecd1a37d393f672e931 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Tue, 7 Jul 2020 09:08:50 +0300 Subject: [PATCH] remove unnecessary code --- src/components/post_status_form/post_status_form.js | 10 +--------- src/components/post_status_form/post_status_form.vue | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 6c0947af..dc5a0386 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -6,7 +6,7 @@ import PollForm from '../poll/poll_form.vue' import Attachment from '../attachment/attachment.vue' import fileTypeService from '../../services/file_type/file_type.service.js' import { findOffset } from '../../services/offset_finder/offset_finder.service.js' -import { reject, map, uniqBy, debounce } from 'lodash' +import { reject, map, uniqBy } from 'lodash' import suggestor from '../emoji_input/suggestor.js' import { mapGetters } from 'vuex' import Checkbox from '../checkbox/checkbox.vue' @@ -396,14 +396,6 @@ const PostStatusForm = { dismissScopeNotice () { this.$store.dispatch('setOption', { name: 'hideScopeNotice', value: true }) }, - debounceSendDescription: debounce(function (id, description) { - statusPoster.setMediaDescription({ store: this.$store, id, description }) - }, 500), - updateMediaDescription (fileId, e) { - const description = e.target.value - this.newStatus.mediaDescriptions[fileId] = description - this.debounceSendDescription(fileId, description) - }, setMediaDescription (id) { const description = this.newStatus.mediaDescriptions[id] if (!description || description.trim() === '') return diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index ea7b5b80..442b9297 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -255,7 +255,6 @@ v-model="newStatus.mediaDescriptions[file.id]" type="text" :placeholder="$t('post_status.media_description')" - @blur="setMediaDescription(file.id)" @keydown.enter.prevent="" >