Bugfix Batch
* Animations disabled on remote events, closing note still triggers animation for local user * Created save icons to fix display on mobile * Hidden URLs are hidden until note is deleted or URL is removed from note * Tags search all categories, but probably not trash * Back to all notes button clears search * Deleted Notes are removed from search index
This commit is contained in:
1 parent
5096e74a60
commit
543ecf0f2d
8 files changed
+58
-45
No files matched your search
@@ -138,11 +138,8 @@ Attachment.delete = (userId, attachmentId, urlDelete = false) => {
|
||||
|
||||
.then((rows, fields) => {
|
||||
|
||||
noteExists = (rows[0]['exists'] > 0)
|
||||
noteExists = (rows[0][0]['exists'] > 0)
|
||||
|
||||
|
||||
|
||||
|
||||
let url = attachment.url
|
||||
const noteId = attachment.note_id
|
||||
|
||||
@@ -158,18 +155,16 @@ Attachment.delete = (userId, attachmentId, urlDelete = false) => {
|
||||
if(attachment.attachment_type == 1 && !urlDelete && noteExists){
|
||||
db.promise()
|
||||
.query(`UPDATE attachment SET visible = 0 WHERE id = ?`, [attachmentId])
|
||||
.then((rows, fields) => { })
|
||||
.then((rows, fields) => resolve(true))
|
||||
.catch(console.log)
|
||||
|
||||
return resolve(true)
|
||||
} else {
|
||||
db.promise()
|
||||
.query(`DELETE FROM attachment WHERE id = ?`, [attachmentId])
|
||||
.then((rows, fields) => resolve(true))
|
||||
.catch(console.log)
|
||||
}
|
||||
|
||||
db.promise()
|
||||
.query(`DELETE FROM attachment WHERE id = ?`, [attachmentId])
|
||||
.then((rows, fields) => { })
|
||||
.catch(console.log)
|
||||
|
||||
return resolve(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user