Fix the annoying sections not updating on import bug.

This commit is contained in:
Timothy Farrell 2018-01-18 13:21:50 -06:00
parent 9381bd6a99
commit bde9896fb2

View File

@ -63,6 +63,9 @@ export function SectionView(vm, params, key) {
photos.sort((a, b) => a.originalDate.localeCompare(b.originalDate)); photos.sort((a, b) => a.originalDate.localeCompare(b.originalDate));
subscribeToRender(vm, [sections]); subscribeToRender(vm, [sections]);
vm.config({
hooks: { willUpdate: (vm, { photos }) => photoArray.splice(0, photoArray.length, ...photos) }
});
return function render(vm, params) { return function render(vm, params) {
const { selectedIds, selectMode, hover, hoverSelectButton } = params; const { selectedIds, selectMode, hover, hoverSelectButton } = params;