Make public favorites optional (Akkoma/Sharkey.NET?)
This commit is contained in:
parent
f36f11045e
commit
ac8519c166
3 changed files with 6 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ const UserProfile = {
|
||||||
return this.isUs || !this.user.hide_followers
|
return this.isUs || !this.user.hide_followers
|
||||||
},
|
},
|
||||||
favoritesTabVisible () {
|
favoritesTabVisible () {
|
||||||
return this.isUs || !this.user.hide_favorites
|
return this.isUs || (this.$store.state.instance.pleromaPublicFavouritesAvailable && !this.user.hide_favorites)
|
||||||
},
|
},
|
||||||
formattedBirthday () {
|
formattedBirthday () {
|
||||||
const browserLocale = localeService.internalToBrowserLocale(this.$i18n.locale)
|
const browserLocale = localeService.internalToBrowserLocale(this.$i18n.locale)
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,7 @@ const defaultState = {
|
||||||
pleromaChatMessagesAvailable: false,
|
pleromaChatMessagesAvailable: false,
|
||||||
pleromaCustomEmojiReactionsAvailable: false,
|
pleromaCustomEmojiReactionsAvailable: false,
|
||||||
pleromaBookmarkFoldersAvailable: false,
|
pleromaBookmarkFoldersAvailable: false,
|
||||||
|
pleromaPublicFavouritesAvailable: true,
|
||||||
gopherAvailable: false,
|
gopherAvailable: false,
|
||||||
mediaProxyAvailable: false,
|
mediaProxyAvailable: false,
|
||||||
suggestionsEnabled: false,
|
suggestionsEnabled: false,
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,10 @@ const fetchAndUpdate = ({
|
||||||
return apiService.fetchTimeline(args)
|
return apiService.fetchTimeline(args)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.errors) {
|
if (response.errors) {
|
||||||
|
if (timeline === 'favorites') {
|
||||||
|
rootState.instance.pleromaPublicFavouritesAvailable = false
|
||||||
|
return
|
||||||
|
}
|
||||||
throw new Error(`${response.status} ${response.statusText}`)
|
throw new Error(`${response.status} ${response.statusText}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue