this.canNavigate ? 1 : 30
}
},
methods: {
diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue
index 6464b99f3e..eb28f8be1f 100644
--- a/src/components/media_modal/media_modal.vue
+++ b/src/components/media_modal/media_modal.vue
@@ -10,6 +10,7 @@
class="modal-image-container"
:direction="swipeDirection"
:threshold="swipeThreshold"
+ :disable-click-threshold="swipeDisableClickThreshold"
@preview-requested="handleSwipePreview"
@swipe-finished="handleSwipeEnd"
@swipeless-clicked="hide"
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js
index 2a0dac85a1..47a4862396 100644
--- a/src/components/react_button/react_button.js
+++ b/src/components/react_button/react_button.js
@@ -41,7 +41,7 @@ const ReactButton = {
},
focusInput () {
this.$nextTick(() => {
- const input = this.$el.querySelector('input')
+ const input = document.querySelector('.reaction-picker-filter > input')
if (input) input.focus()
})
},
diff --git a/src/components/settings_modal/tabs/filtering_tab.js b/src/components/settings_modal/tabs/filtering_tab.js
index 5354e5dbd0..7c37f0bcb1 100644
--- a/src/components/settings_modal/tabs/filtering_tab.js
+++ b/src/components/settings_modal/tabs/filtering_tab.js
@@ -1,4 +1,4 @@
-import { filter, trim } from 'lodash'
+import { filter, trim, debounce } from 'lodash'
import BooleanSetting from '../helpers/boolean_setting.vue'
import ChoiceSetting from '../helpers/choice_setting.vue'
import IntegerSetting from '../helpers/integer_setting.vue'
@@ -29,11 +29,16 @@ const FilteringTab = {
},
set (value) {
this.muteWordsStringLocal = value
+ this.debouncedSetMuteWords(value)
+ }
+ },
+ debouncedSetMuteWords () {
+ return debounce((value) => {
this.$store.dispatch('setOption', {
name: 'muteWords',
value: filter(value.split('\n'), (word) => trim(word).length > 0)
})
- }
+ }, 1000)
}
},
// Updating nested properties
diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js
index b86faef0e7..ff2ccef224 100644
--- a/src/components/settings_modal/tabs/profile_tab.js
+++ b/src/components/settings_modal/tabs/profile_tab.js
@@ -153,7 +153,7 @@ const ProfileTab = {
return false
},
deleteField (index, event) {
- this.$delete(this.newFields, index)
+ this.newFields.splice(index, 1)
},
uploadFile (slot, e) {
const file = e.target.files[0]
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index fe8778cff6..35b153627a 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -84,7 +84,7 @@
:user="statusoid.user"
/>
-
@@ -101,7 +101,7 @@
v-else
:to="retweeterProfileLink"
>{{ retweeter }}
-
+
{{ ' ' }}
30
},
+ disableClickThreshold: {
+ type: Function,
+ default: () => 1
+ },
perpendicularTolerance: {
type: Number,
default: 1.0
@@ -72,6 +78,7 @@ const SwipeClick = {
this.$gesture = new GestureService.SwipeAndClickGesture({
direction: this.direction,
threshold: this.threshold,
+ disableClickThreshold: this.disableClickThreshold,
perpendicularTolerance: this.perpendicularTolerance,
swipePreviewCallback: this.preview,
swipeEndCallback: this.end,
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 5a5c7b1b74..77dd7e1c2d 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -765,6 +765,7 @@ const statuses = {
return store.rootState.api.backendInteractor.search2({ q, resolve, limit, offset, following, type })
.then((data) => {
store.commit('addNewUsers', data.accounts)
+ store.commit('addNewUsers', data.statuses.map(s => s.user).filter(u => u))
store.commit('addNewStatuses', { statuses: data.statuses })
return data
})
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 00d1c020d7..af12265e89 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -734,26 +734,22 @@ const fetchTimeline = ({
const queryString = map(params, (param) => `${param[0]}=${param[1]}`).join('&')
url += `?${queryString}`
- let status = ''
- let statusText = ''
-
- let pagination = {}
return fetch(url, { headers: authHeaders(credentials) })
- .then((data) => {
- status = data.status
- statusText = data.statusText
- pagination = parseLinkHeaderPagination(data.headers.get('Link'), {
- flakeId: timeline !== 'bookmarks' && timeline !== 'notifications'
- })
- return data
- })
- .then((data) => data.json())
- .then((data) => {
- if (!data.errors) {
+ .then(async (response) => {
+ const success = response.ok
+
+ const data = await response.json()
+
+ if (success && !data.errors) {
+ const pagination = parseLinkHeaderPagination(response.headers.get('Link'), {
+ flakeId: timeline !== 'bookmarks' && timeline !== 'notifications'
+ })
+
return { data: data.map(isNotifications ? parseNotification : parseStatus), pagination }
} else {
- data.status = status
- data.statusText = statusText
+ data.errors ||= []
+ data.status = response.status
+ data.statusText = response.statusText
return data
}
})