@@ -129,6 +129,7 @@ import { directive as ClickOutside } from 'v-click-outside'
129129import { generateOcsUrl } from ' @nextcloud/router'
130130import { loadState } from ' @nextcloud/initial-state'
131131import { showError } from ' @nextcloud/dialogs'
132+ import { emit } from ' @nextcloud/event-bus'
132133import axios from ' @nextcloud/axios'
133134import moment from ' @nextcloud/moment'
134135import debounce from ' debounce'
@@ -333,6 +334,8 @@ export default {
333334 lastQuestion .focus ()
334335 })
335336
337+ emit (' change-last-updated' , this .form .id )
338+
336339 } catch (error) {
337340 logger .error (' Error while adding new question' , { error })
338341 showError (t (' forms' , ' There was an error while adding the new question' ))
@@ -354,6 +357,7 @@ export default {
354357 await axios .delete (generateOcsUrl (' apps/forms/api/v2/question/{id}' , { id }))
355358 const index = this .form .questions .findIndex (search => search .id === id)
356359 this .form .questions .splice (index, 1 )
360+ emit (' change-last-updated' , this .form .id )
357361 } catch (error) {
358362 logger .error (` Error while removing question ${ id} ` , { error })
359363 showError (t (' forms' , ' There was an error while removing the question' ))
@@ -374,6 +378,7 @@ export default {
374378 formId: this .form .id ,
375379 newOrder,
376380 })
381+ emit (' change-last-updated' , this .form .id )
377382 } catch (error) {
378383 logger .error (' Error while saving form' , { error })
379384 showError (t (' forms' , ' Error while saving form' ))
0 commit comments