fix: avoid sending language settings multiple times
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2534>
This commit is contained in:
parent
9625732b08
commit
4525d083af
|
@ -225,7 +225,9 @@ const store: Module<State, RootState> = {
|
|||
commit('notifications', { type: 'pendingReviewRequests', count: response.data.count })
|
||||
},
|
||||
|
||||
async currentLanguage ({ commit, rootState }, value) {
|
||||
async currentLanguage ({ commit, rootState, state }, value) {
|
||||
if (state.selectedLanguage && state.currentLanguage === value) return
|
||||
|
||||
commit('currentLanguage', value)
|
||||
if (rootState.auth.authenticated) {
|
||||
await axios.post('users/settings', { language: value })
|
||||
|
|
Loading…
Reference in New Issue