Skip to content

Commit

Permalink
Merge pull request #558 from Pat1enceLos/fixSubtitlePos
Browse files Browse the repository at this point in the history
fix(main.js): fix prefrence can not open with ctrl+, in Windows
  • Loading branch information
ipy authored Apr 4, 2019
2 parents d55e085 + 1ad26ab commit 3694da5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/renderer/components/PlayingView/SubtitleControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ export default {
hoverIndex: -5,
hiddenText: false,
hoverHeight: 0,
timer: null,
count: 1,
stopCount: 10,
animClass: false,
Expand Down Expand Up @@ -191,7 +190,7 @@ export default {
return this.winRatio >= 1 ? this.winHeight : this.winWidth;
},
noSubtitle() {
if (this.timer && this.isInitial) {
if (this.animClass && this.isInitial) {
return this.$t('msg.subtitle.menuLoading');
}
return this.calculatedNoSub ? this.$t('msg.subtitle.noSubtitle') : this.$t('msg.subtitle.notToShowSubtitle');
Expand Down Expand Up @@ -287,7 +286,6 @@ export default {
originSrc() {
this.showAttached = false;
this.computedAvaliableItems = [];
clearInterval(this.timer);
},
currentSubtitleIndex(val) {
if (val === 0) {
Expand Down Expand Up @@ -402,7 +400,7 @@ export default {
if (!this.privacyAgreement) {
this.$bus.$emit('privacy-confirm');
this.continueRefresh = true;
} else if (this.privacyAgreement && !this.timer) {
} else if (this.privacyAgreement && !this.animClass) {
this.transFlag = false;
this.animClass = true;
const types = ['local'];
Expand Down Expand Up @@ -434,7 +432,7 @@ export default {
}
clearTimeout(this.breakTimer);
this.breakTimer = setTimeout(() => {
if (this.timer) {
if (this.animClass) {
this.$bus.$emit('refresh-finished', !this.isInitial);
}
}, 10000);
Expand Down Expand Up @@ -541,8 +539,11 @@ export default {
}
});
this.$bus.$on('refresh-finished', (timeout) => {
clearInterval(this.timer);
this.stopCount = this.count + 1;
if (this.showAttached) {
this.stopCount = this.count + 1;
} else {
this.animClass = false;
}
this.transFlag = true;
if (timeout) {
setTimeout(() => {
Expand All @@ -564,7 +565,6 @@ export default {
}
this.refAnimation = 'refresh-animation';
this.$refs.scroll.scrollTop = 0;
this.timer = null;
}, 1000);
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ new Vue({
template.splice(4, 0, {
label: this.$t('msg.splayerx.preferences'),
enabled: true,
accelerator: 'Cmd+,',
accelerator: 'Ctrl+,',
click: () => {
this.$electron.ipcRenderer.send('add-preference');
},
Expand Down

0 comments on commit 3694da5

Please sign in to comment.