diff --git a/README.md b/README.md
index 57c5407d..9cb1f983 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@
- custom ones for certain users
- volume controls for all sounds individually
- rename "repeats" to "boosts"
+- add toggle for deduping boosts (this was done by default upstream)
- raise limits:
- polls can now have up to 20 options instead of 4
- polls can now last anywhere from 1 second to 1000 years
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index 9928f927..1515d4c2 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -285,6 +285,14 @@
{{ $t('settings.search_pagination_limit') }}
+
+
+ {{ $t('settings.dedupe_boosts') }}
+
+
{{ $t('settings.columns') }}
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 5fcc477e..f1db37cf 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -541,6 +541,7 @@
"current_mascot": "Your current mascot",
"current_password": "Current password",
"data_import_export_tab": "Data import / export",
+ "dedupe_boosts": "Deduplicate boosts on the timeline (requires refresh/re-fetch)",
"default_vis": "Default visibility scope",
"delete_account": "Delete account",
"delete_account_description": "Permanently delete your data and deactivate your account.",
diff --git a/src/modules/config.js b/src/modules/config.js
index daa27d73..da8fb2ef 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -127,6 +127,7 @@ export const defaultState = {
reactionsFilterItems: '',
recurseSearch: false,
recurseSearchLimit: 100,
+ dedupeBoosts: true,
renderMisskeyMarkdown: undefined,
renderMfmOnHover: undefined, // instance default
conversationDisplay: undefined, // instance default
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 85dcab9a..15b5f358 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -83,6 +83,7 @@ const defaultState = {
reactionsFilterItems: '',
recurseSearch: false,
recurseSearchLimit: 100,
+ dedupeBoosts: true,
renderMisskeyMarkdown: true,
renderMfmOnHover: false,
conversationDisplay: 'linear',
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 4c0fee7e..973d3a0f 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -155,7 +155,7 @@ const removeStatusFromGlobalStorage = (state, status) => {
}
}
-const addNewStatuses = (state, { statuses, showImmediately = false, timeline, user = {}, noIdUpdate = false, userId, pagination = {} }) => {
+const addNewStatuses = (state, { statuses, showImmediately = false, timeline, user = {}, noIdUpdate = false, userId, pagination = {}, rootState }) => {
// Sanity check
if (!isArray(statuses)) {
return false
@@ -261,7 +261,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
let retweet
// If the retweeted status is already there, don't add the retweet
// to the timeline.
- if (timeline && find(timelineObject.statuses, (s) => {
+ if (rootState.config.dedupeBoosts && timeline && find(timelineObject.statuses, (s) => {
if (s.retweeted_status) {
return s.id === retweetedStatus.id || s.retweeted_status.id === retweetedStatus.id
} else {
@@ -590,7 +590,7 @@ const statuses = {
state: defaultState(),
actions: {
addNewStatuses ({ rootState, commit }, { statuses, showImmediately = false, timeline = false, noIdUpdate = false, userId, pagination }) {
- commit('addNewStatuses', { statuses, showImmediately, timeline, noIdUpdate, user: rootState.users.currentUser, userId, pagination })
+ commit('addNewStatuses', { statuses, showImmediately, timeline, noIdUpdate, user: rootState.users.currentUser, userId, pagination, rootState })
},
addNewNotifications (store, { notifications, older }) {
const { commit, dispatch, rootGetters } = store