Skip to content

Commit

Permalink
Merge pull request #1450 from nextcloud/fix/sync_content
Browse files Browse the repository at this point in the history
fixes to display latest page content in reader
  • Loading branch information
juliusknorr authored Aug 28, 2024
2 parents cc8df1f + 1e4716a commit d0bb41f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/mixins/editorMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ export default {
readOnly: false,
shareToken: this.shareTokenParam || null,
autofocus: false,
onCreate: ({ markdown }) => {
this.updateEditorContentDebounced(markdown)
},
onLoaded: () => {
this.done('editor')
},
Expand Down
13 changes: 8 additions & 5 deletions src/mixins/pageContentMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ export default {
* @param {string} davUrl URL to fetch page via DAV
*/
async fetchPageContent(davUrl) {
// Add `timestamp` as cache buster param
const axiosConfig = {
params: {
timestamp: Math.floor(Date.now() / 1000),
},
}
// Authenticate via share token for public shares
let axiosConfig = {}
if (this.isPublic) {
axiosConfig = {
auth: {
username: this.shareTokenParam,
},
axiosConfig.auth = {
username: this.shareTokenParam,
}
}

Expand Down

0 comments on commit d0bb41f

Please sign in to comment.