aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-11-29 01:36:14 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2019-11-29 01:36:14 +0200
commit8a94d186c33e3b4c8bf5caf14d2d7aad20e347cc (patch)
tree420883d6ca37024f834defd13a6bf01e7d687483
parent71a117c267ea8cd7c9bc9302c6671b75e212b13d (diff)
fix context type inconsistencies
-rw-r--r--ext/mixed/js/display.js12
1 files changed, 6 insertions, 6 deletions
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) {