Refactor chat message removal logic
This commit is contained in:
@@ -31,7 +31,14 @@
|
|||||||
|
|
||||||
let msgDisplay = ''
|
let msgDisplay = ''
|
||||||
let translated = get(DataBase).autoTranslate
|
let translated = get(DataBase).autoTranslate
|
||||||
async function rm(){
|
async function rm(e:MouseEvent){
|
||||||
|
if(e.shiftKey){
|
||||||
|
let msg = $CurrentChat.message
|
||||||
|
msg = msg.slice(0, idx)
|
||||||
|
$CurrentChat.message = msg
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const rm = $DataBase.askRemoval ? await alertConfirm(language.removeChat) : true
|
const rm = $DataBase.askRemoval ? await alertConfirm(language.removeChat) : true
|
||||||
if(rm){
|
if(rm){
|
||||||
if($DataBase.instantRemove){
|
if($DataBase.instantRemove){
|
||||||
|
|||||||
Reference in New Issue
Block a user