update view before loading and update sync gateway