From 8a94d186c33e3b4c8bf5caf14d2d7aad20e347cc Mon Sep 17 00:00:00 2001 From: siikamiika Date: Fri, 29 Nov 2019 01:36:14 +0200 Subject: fix context type inconsistencies --- ext/mixed/js/display.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ext/mixed/js') diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index d83efc13..dc8766b4 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -80,7 +80,6 @@ class Display { }) } }, - type: 'kanji', sentence: this.context.sentence, url: this.context.url }; @@ -132,7 +131,6 @@ class Display { }) } }, - type: 'terms', disableScroll, sentence, url: this.context.url @@ -361,6 +359,7 @@ class Display { } this.definitions = definitions; + context.type = 'terms'; this.context = context; const sequence = ++this.sequence; @@ -421,6 +420,7 @@ class Display { } this.definitions = definitions; + context.type = 'kanji'; this.context = context; const sequence = ++this.sequence; @@ -548,16 +548,16 @@ class Display { }) } }); - const {type, details} = this.context.source; - this.setContent(type, details); + const {details} = this.context.source; + this.setContent(details.context.type, details); } poppedTermView() { if (this.poppedContextHistory.length === 0) { return; } this.context.index = this.index; this.context.scroll = this.windowScroll.y; - const {type, details} = this.poppedContextHistory.pop(); - this.setContent(type, details); + const {details} = this.poppedContextHistory.pop(); + this.setContent(details.context.type, details); } noteTryAdd(mode) { -- cgit v1.2.3