Reload after logging in

This commit is contained in:
Peter Stuifzand 2018-12-29 10:59:29 +01:00
parent 3d484def87
commit 966546086d
2 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,10 @@ export default new Vuex.Store({
setChannelCreatorState(state, open) {
state.channelCreatorIsOpen = open
},
newEndpoints(state, endpoints) {
state.micropubEndpoint = endpoints.micropubEndpoint
state.microsubEndpoint = endpoints.microsubEndpoint
},
createEventSource(state, url) {
state.eventSource = new EventSource(state.microsubEndpoint + url, {
headers: {

View File

@ -78,6 +78,9 @@
watch: {
'$route'(to, from) {
if (to === from) {
this.$forceUpdate()
}
this.$store.dispatch('fetchChannels')
this.$store.dispatch('fetchTimeline', {uid: to.params.uid}).then(() => {
window.scrollTo({top: 0})