add toggle for deduping boosts
This commit is contained in:
parent
7a26107808
commit
d575980d1e
6 changed files with 15 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -285,6 +285,14 @@
|
|||
{{ $t('settings.search_pagination_limit') }}
|
||||
</IntegerSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="dedupeBoosts"
|
||||
expert="1"
|
||||
>
|
||||
{{ $t('settings.dedupe_boosts') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<h3>{{ $t('settings.columns') }}</h3>
|
||||
</li>
|
||||
|
|
|
@ -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.",
|
||||
|
|
|
@ -127,6 +127,7 @@ export const defaultState = {
|
|||
reactionsFilterItems: '',
|
||||
recurseSearch: false,
|
||||
recurseSearchLimit: 100,
|
||||
dedupeBoosts: true,
|
||||
renderMisskeyMarkdown: undefined,
|
||||
renderMfmOnHover: undefined, // instance default
|
||||
conversationDisplay: undefined, // instance default
|
||||
|
|
|
@ -83,6 +83,7 @@ const defaultState = {
|
|||
reactionsFilterItems: '',
|
||||
recurseSearch: false,
|
||||
recurseSearchLimit: 100,
|
||||
dedupeBoosts: true,
|
||||
renderMisskeyMarkdown: true,
|
||||
renderMfmOnHover: false,
|
||||
conversationDisplay: 'linear',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue