add setting to set boosts to be the same as default post visibility
This commit is contained in:
parent
b457c07156
commit
ae35c58425
7 changed files with 25 additions and 1 deletions
|
@ -25,7 +25,11 @@ const RetweetButton = {
|
|||
},
|
||||
doRetweet () {
|
||||
if (!this.status.repeated) {
|
||||
this.$store.dispatch('retweet', { id: this.status.id })
|
||||
if (this.$store.getters.mergedConfig.boostsFollowDefVis) {
|
||||
this.$store.dispatch('retweet_dv', { id: this.status.id })
|
||||
} else {
|
||||
this.$store.dispatch('retweet', { id: this.status.id })
|
||||
}
|
||||
} else {
|
||||
this.$store.dispatch('unretweet', { id: this.status.id })
|
||||
}
|
||||
|
|
|
@ -561,6 +561,11 @@
|
|||
/>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path="boostsFollowDefVis">
|
||||
{{ $t('settings.boosts_follow_def_vis') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path="sensitiveByDefault">
|
||||
{{ $t('settings.sensitive_by_default') }}
|
||||
|
|
|
@ -492,6 +492,7 @@
|
|||
"block_import_error": "Error importing blocks",
|
||||
"blocks_imported": "Blocks imported! Processing them will take a while.",
|
||||
"blocks_tab": "Blocks",
|
||||
"boosts_follow_def_vis": "Make boosts follow default visibility",
|
||||
"bot": "This is a bot account",
|
||||
"btnRadius": "Buttons",
|
||||
"cBlue": "Blue (Reply, follow)",
|
||||
|
|
|
@ -112,6 +112,7 @@ export const defaultState = {
|
|||
soundOnNotif: false,
|
||||
soundOnNotifVolume: 0.2,
|
||||
soundOnNotifCustom: '',
|
||||
boostsFollowDefVis: false,
|
||||
renderMisskeyMarkdown: undefined,
|
||||
renderMfmOnHover: undefined, // instance default
|
||||
conversationDisplay: undefined, // instance default
|
||||
|
|
|
@ -70,6 +70,7 @@ const defaultState = {
|
|||
soundOnNotif: false,
|
||||
soundOnNotifVolume: 0.2,
|
||||
soundOnNotifCustom: '',
|
||||
boostsFollowDefVis: false,
|
||||
renderMisskeyMarkdown: true,
|
||||
renderMfmOnHover: false,
|
||||
conversationDisplay: 'linear',
|
||||
|
|
|
@ -669,6 +669,12 @@ const statuses = {
|
|||
rootState.api.backendInteractor.retweet({ id: status.id })
|
||||
.then(status => commit('setRetweetedConfirm', { status: status.retweeted_status, user: rootState.users.currentUser }))
|
||||
},
|
||||
retweet_dv ({ rootState, commit }, status) {
|
||||
// Optimistic retweeting... ????????
|
||||
commit('setRetweeted', { status, value: true })
|
||||
rootState.api.backendInteractor.retweet_dv({ id: status.id, visibility: rootState.users.currentUser.default_scope })
|
||||
.then(status => commit('setRetweetedConfirm', { status: status.retweeted_status, user: rootState.users.currentUser }))
|
||||
},
|
||||
unretweet ({ rootState, commit }, status) {
|
||||
// Optimistic unretweeting...
|
||||
commit('setRetweeted', { status, value: false })
|
||||
|
|
|
@ -844,6 +844,11 @@ const retweet = ({ id, credentials }) => {
|
|||
.then((data) => parseStatus(data))
|
||||
}
|
||||
|
||||
const retweet_dv = ({ id, credentials, visibility }) => {
|
||||
return promisedRequest({ url: MASTODON_RETWEET_URL(id), method: 'POST', credentials, payload: {"visibility": visibility} })
|
||||
.then((data) => parseStatus(data))
|
||||
}
|
||||
|
||||
const unretweet = ({ id, credentials }) => {
|
||||
return promisedRequest({ url: MASTODON_UNRETWEET_URL(id), method: 'POST', credentials })
|
||||
.then((data) => parseStatus(data))
|
||||
|
@ -1785,6 +1790,7 @@ const apiService = {
|
|||
favorite,
|
||||
unfavorite,
|
||||
retweet,
|
||||
retweet_dv,
|
||||
unretweet,
|
||||
bookmarkStatus,
|
||||
unbookmarkStatus,
|
||||
|
|
Loading…
Add table
Reference in a new issue