Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5661962 authored by Azul's avatar Azul
Browse files

Add calendar in the right order according to dav.



When reloading updated calendars we effectively re-add them.
Put them in the list of calendars in the place they belong to
according to the `order` given by the dav response.

Signed-off-by: default avatarAzul <azul@riseup.net>
parent 48d78d98
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -62,8 +62,7 @@ const mutations = {
	 */
	 */
	addCalendar(state, { calendar }) {
	addCalendar(state, { calendar }) {
		const object = getDefaultCalendarObject(calendar)
		const object = getDefaultCalendarObject(calendar)

		state.calendars.splice(object.dav.order, 0, object)
		state.calendars.push(object)
		Vue.set(state.calendarsById, object.id, object)
		Vue.set(state.calendarsById, object.id, object)
	},
	},