fix reply bar bug

This commit is contained in:
xmcp
2020-01-12 19:43:10 +08:00
parent 5a34673cd1
commit 906d228a37
2 changed files with 3 additions and 2 deletions

View File

@@ -322,7 +322,7 @@ class FlowSidebar extends PureComponent {
show_reply_bar(name,event) {
if(this.reply_ref.current && !event.target.closest('a, .clickable')) {
let text=this.reply_ref.current.get();
if(/^\s*(?:Re (?:|洞主|(?:[A-Z][a-z]+ )?(?:[A-Z][a-z]+)):)?\s*$/.test(text)) {// text is nearly empty so we can replace it
if(/^\s*(?:Re (?:|洞主|(?:[A-Z][a-z]+ )?(?:[A-Z][a-z]+)|You Win(?: \d+)?):)?\s*$/.test(text)) {// text is nearly empty so we can replace it
let should_text='Re '+name+': ';
if(should_text===this.reply_ref.current.get())
this.reply_ref.current.set('');