Fix imageclipboard saveImage().
This commit is contained in:
@@ -125,7 +125,7 @@ Item {
|
||||
background: RippleEffect {
|
||||
onClicked: {
|
||||
var localPath = StandardPaths.writableLocation(StandardPaths.CacheLocation) + "/screenshots/" + (new Date()).getTime() + ".png"
|
||||
imageClipboard.saveImage(localPath)
|
||||
if (!imageClipboard.saveImage(localPath)) return
|
||||
roomPanelInput.attach(localPath)
|
||||
attachDialog.close()
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ Control {
|
||||
Keys.onReturnPressed: {
|
||||
if (event.modifiers & Qt.ShiftModifier) {
|
||||
insert(cursorPosition, "\n")
|
||||
} else if (text) {
|
||||
} else {
|
||||
postMessage(text)
|
||||
text = ""
|
||||
closeAll()
|
||||
@@ -353,7 +353,6 @@ Control {
|
||||
}
|
||||
|
||||
function postMessage(text) {
|
||||
if (text.trim().length === 0) { return }
|
||||
if(!currentRoom) { return }
|
||||
|
||||
if (hasAttachment) {
|
||||
@@ -362,6 +361,8 @@ Control {
|
||||
return
|
||||
}
|
||||
|
||||
if (text.trim().length === 0) { return }
|
||||
|
||||
var PREFIX_ME = '/me '
|
||||
var PREFIX_NOTICE = '/notice '
|
||||
var PREFIX_RAINBOW = '/rainbow '
|
||||
|
||||
Reference in New Issue
Block a user