chore(StatusChatInput): fixup indentation

This commit is contained in:
Lukáš Tinkl 2023-01-25 19:31:00 +01:00 committed by Lukáš Tinkl
parent b3f86c566f
commit 9eb515e3e3

View File

@ -222,7 +222,7 @@ Rectangle {
if(mentionsPos.length == 0) return if(mentionsPos.length == 0) return
const unformattedText = messageInputField.getText(0, messageInputField.length) const unformattedText = messageInputField.getText(0, messageInputField.length)
mentionsPos = mentionsPos.filter( mention => unformattedText.charAt(mention.leftIndex) === "@") mentionsPos = mentionsPos.filter(mention => unformattedText.charAt(mention.leftIndex) === "@")
} }
function insertMention(aliasName, publicKey, lastAtPosition, lastCursorPosition) { function insertMention(aliasName, publicKey, lastAtPosition, lastCursorPosition) {
@ -411,7 +411,7 @@ Rectangle {
anticipatedCursorPosition += event.key === Qt.Key_Backspace ? anticipatedCursorPosition += event.key === Qt.Key_Backspace ?
-1 : 1 -1 : 1
const mention = d.getMentionAtPosition(anticipatedCursorPosition) const mention = d.getMentionAtPosition(anticipatedCursorPosition)
if(mention) { if(mention) {
d.removeMention(mention) d.removeMention(mention)
event.accepted = true event.accepted = true
@ -909,15 +909,15 @@ Rectangle {
target: Global.dragArea target: Global.dragArea
ignoreUnknownSignals: true ignoreUnknownSignals: true
function onDroppedOnValidScreen(drop) { function onDroppedOnValidScreen(drop) {
let validImages = validateImages(drop.urls) let validImages = validateImages(drop.urls)
if (validImages.length > 0) { if (validImages.length > 0) {
showImageArea(validImages) showImageArea(validImages)
drop.acceptProposedAction() drop.acceptProposedAction()
} }
} }
} }
// This is used by Squish tests to not have to access the file dialog // This is used by Squish tests to not have to access the file dialog
function selectImageString(filePath) { function selectImageString(filePath) {
let validImages = validateImages([filePath]) let validImages = validateImages([filePath])
if (validImages.length > 0) { if (validImages.length > 0) {
@ -1479,5 +1479,4 @@ Rectangle {
} }
} }
} }
} }