Mobile: top level heart reaction on double tab
This commit is contained in:
parent
ac184de2b2
commit
62cf15f2de
16 changed files with 199 additions and 39 deletions
|
|
@ -3,6 +3,7 @@ import * as linkify from 'linkifyjs';
|
|||
import linkifyHtml from 'linkify-html';
|
||||
import utils from "../../plugins/utils"
|
||||
import util from "../../plugins/utils";
|
||||
import Hammer from "hammerjs";
|
||||
|
||||
linkify.options.defaults.className = "link";
|
||||
linkify.options.defaults.target = { url: "_blank" };
|
||||
|
|
@ -48,10 +49,10 @@ export default {
|
|||
event: {},
|
||||
thread: null,
|
||||
utils,
|
||||
mc: null,
|
||||
mcCustom: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.thread = null;
|
||||
},
|
||||
|
|
@ -326,5 +327,20 @@ export default {
|
|||
* Override this to handle updates to (the) message thread.
|
||||
*/
|
||||
processThread() {},
|
||||
initMsgHammerJs(element) {
|
||||
this.mc = new Hammer(element);
|
||||
this.mcCustom = new Hammer.Manager(element);
|
||||
|
||||
this.mcCustom.add(new Hammer.Tap({ event: 'doubletap', taps: 2 }));
|
||||
|
||||
this.mcCustom.on("doubletap", () => {
|
||||
this.$emit("addQuickHeartReaction");
|
||||
});
|
||||
|
||||
this.mc.on("press", () => {
|
||||
this.showContextMenu(this.$refs.opbutton);
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue