Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit df21fa65 authored by Eva Bardou's avatar Eva Bardou

Prevent current transcription update when picking compared transcriptions

parent ab9a8176
......@@ -85,7 +85,6 @@ export const mutations = {
tr[transcription.transcription] = transcription
state.all[index] = { ...state.all[index], transcriptions: tr }
}
state.all[index] = { ...state.all[index], currentTrans: transcription }
// Force reference update on the whole array
// so that all components get a full refresh after an update
state.all = [...state.all]
......
......@@ -115,6 +115,7 @@ export const actions = {
try {
const resp = await api.createContent(rootState.document.id, rootState.parts.pk, content)
commit('lines/setTranscriptions', { pk: currentTransLine, transcription: resp.data }, {root: true})
commit('lines/updateCurrentTrans', resp.data, {root: true})
} catch (err) {
console.log('couldnt create transcription!', err);
}
......@@ -124,6 +125,7 @@ export const actions = {
try {
const resp = await api.updateContent(rootState.document.id, rootState.parts.pk, pk, content)
commit('lines/setTranscriptions', { pk: currentTransLine, transcription: resp.data }, {root: true})
commit('lines/updateCurrentTrans', resp.data, {root: true})
} catch (err) {
console.log('couldnt update transcription!', err);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment