forked from abner/for-legacy-web
Fix: Prevent clicking on links in reply / channel header.
Jump to existing message if exists.
This commit is contained in:
1 parent
3075fc8e32
commit
b806902bc4
3 files changed
+18
-1
No files matched your search
@@ -73,6 +73,16 @@ export class SingletonRenderer extends EventEmitter3 {
|
||||
}
|
||||
|
||||
async init(id: string, message_id?: string) {
|
||||
if (message_id) {
|
||||
if (this.state.type === 'RENDER') {
|
||||
let message = this.state.messages.find(x => x._id === message_id);
|
||||
if (message) {
|
||||
this.emit("scroll", { type: "ScrollToView", id: message_id });
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.channel = id;
|
||||
this.stale = false;
|
||||
this.setStateUnguarded({ type: "LOADING" });
|
||||
|
||||
Reference in new issue
Block a user