Merge pull request #837 from h3poteto/iss-515

fixes #515 Reload app general config after change preferences
This commit is contained in:
AkiraFukushima 2019-02-23 18:54:57 +09:00 committed by GitHub
commit c59169fa88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 1 deletions

View File

@ -27,5 +27,16 @@
"l": "Switch the focus to right column",
"?": "Show this help"
}
},
"preferences": {
"general": {
"timeline": {
"title": "Timeline",
"description": "Customize view in your timelines.",
"cw": "Always ignore contents warnings",
"nfsw": "Always ignore NFSW of medias",
"hideAllAttachments": "Hide all medias"
}
}
}
}

View File

@ -27,5 +27,16 @@
"l": "Switch the focus to right column",
"?": "Show this help"
}
},
"preferences": {
"general": {
"timeline": {
"title": "Timeline",
"description": "Customize view in your timelines.",
"cw": "Always ignore contents warnings",
"nfsw": "Always ignore NFSW of medias",
"hideAllAttachments": "Hide all medias"
}
}
}
}

View File

@ -115,6 +115,13 @@
"description": "操作時の効果音を設定",
"fav_rb": "お気に入り,ブースト時",
"toot": "トゥート時"
},
"timeline": {
"title": "タイムライン",
"description": "タイムラインをカスタマイズ",
"cw": "常にCWを表示する",
"nfsw": "常にNFSWを表示する",
"hideAllAttachments": "すべてのメディアを非表示にする"
}
},
"appearance": {

View File

@ -0,0 +1,13 @@
{
"preferences": {
"general": {
"timeline": {
"title": "Timeline",
"description": "Customize view in your timelines.",
"cw": "Always ignore contents warnings",
"nfsw": "Always ignore NFSW of medias",
"hideAllAttachments": "Hide all medias"
}
}
}
}

View File

@ -27,5 +27,16 @@
"l": "Switch the focus to right column",
"?": "Show this help"
}
},
"preferences": {
"general": {
"timeline": {
"title": "Timeline",
"description": "Customize view in your timelines.",
"cw": "Always ignore contents warnings",
"nfsw": "Always ignore NFSW of medias",
"hideAllAttachments": "Hide all medias"
}
}
}
}

View File

@ -66,7 +66,7 @@ const General = {
})
})
},
updateTimeline ({ commit, state }, timeline) {
updateTimeline ({ commit, state, dispatch }, timeline) {
commit('changeLoading', true)
const newTimeline = Object.assign({}, state.general.timeline, timeline)
const newGeneral = Object.assign({}, state.general, {
@ -85,6 +85,7 @@ const General = {
ipcRenderer.removeAllListeners('error-update-preferences')
commit('updateGeneral', conf.general)
commit('changeLoading', false)
dispatch('App/loadPreferences', null, { root: true })
resolve(conf)
})
ipcRenderer.send('update-preferences', config)