Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Add workaround for Clipboard qml bug. Fixes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
aebruno committed Jun 8, 2016
1 parent ce7bb0d commit e48b7a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qml/pages/MessagesView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ SilicaListView {
function remove(contentItem) {
contentItem.remorseAction(qsTr("Deleting"),
function() {
console.log("Delete message: "+contentItem.msg.id)
whisperfish.deleteMessage(contentItem.msg.id)
console.log("Delete message: "+contentItem.modelData.id)
whisperfish.deleteMessage(contentItem.modelData.id)
})
}

function copy(contentItem) {
Clipboard.text = contentItem.msg.message
whisperfish.copyToClipboard(contentItem.modelData.message)
}

Component {
Expand Down
4 changes: 4 additions & 0 deletions whisperfish.go
Original file line number Diff line number Diff line change
Expand Up @@ -1130,3 +1130,7 @@ func (w *Whisperfish) syncReadHandler(source string, ts uint64) {
log.Debug("Processing sync read message")
w.receiptHandler(source, 0, ts)
}

func (w *Whisperfish) CopyToClipboard(text string) {
w.engine.SailfishCopyToClipboard(text)
}

0 comments on commit e48b7a9

Please sign in to comment.