add Akkoma compatibility (tested on IceShrimp)
This commit is contained in:
parent
60e5c3b042
commit
f36f11045e
13 changed files with 28 additions and 12 deletions
|
|
@ -281,6 +281,7 @@ const api = {
|
|||
// Bookmark folders
|
||||
startFetchingBookmarkFolders (store) {
|
||||
if (store.state.fetchers.bookmarkFolders) return
|
||||
if (!store.rootState.instance.pleromaBookmarkFoldersAvailable) return
|
||||
const fetcher = store.state.backendInteractor.startFetchingBookmarkFolders({ store })
|
||||
store.commit('addFetcher', { fetcherName: 'bookmarkFolders', fetcher })
|
||||
},
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ export const defaultState = () => ({
|
|||
allStatusesObject: {},
|
||||
conversationsObject: {},
|
||||
maxId: 0,
|
||||
scrobblesUnsupported: false,
|
||||
favorites: new Set(),
|
||||
timelines: {
|
||||
mentions: emptyTl(),
|
||||
|
|
@ -112,8 +113,14 @@ const getLatestScrobble = (state, user) => {
|
|||
return
|
||||
}
|
||||
|
||||
if (state.scrobblesUnsupported) return
|
||||
|
||||
state.scrobblesNextFetch[user.id] = Date.now() + 24 * 60 * 60 * 1000
|
||||
apiService.fetchScrobbles({ accountId: user.id }).then((scrobbles) => {
|
||||
if (scrobbles?.error?.status === 501) {
|
||||
state.scrobblesUnsupported = true
|
||||
}
|
||||
|
||||
if (scrobbles.length > 0) {
|
||||
user.latestScrobble = scrobbles[0]
|
||||
|
||||
|
|
|
|||
|
|
@ -599,6 +599,7 @@ const users = {
|
|||
return new Promise((resolve, reject) => {
|
||||
const commit = store.commit
|
||||
const dispatch = store.dispatch
|
||||
const rootState = store.rootState
|
||||
commit('beginLogin')
|
||||
store.rootState.api.backendInteractor.verifyCredentials(accessToken)
|
||||
.then((data) => {
|
||||
|
|
@ -665,8 +666,10 @@ const users = {
|
|||
// Start fetching notifications
|
||||
dispatch('startFetchingNotifications')
|
||||
|
||||
// Start fetching chats
|
||||
dispatch('startFetchingChats')
|
||||
if (rootState.instance.pleromaChatMessagesAvailable) {
|
||||
// Start fetching chats
|
||||
dispatch('startFetchingChats')
|
||||
}
|
||||
}
|
||||
|
||||
dispatch('startFetchingLists')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue