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

Commit

Permalink
Move delete conversation to main session view.
Browse files Browse the repository at this point in the history
  • Loading branch information
aebruno committed Jun 8, 2016
1 parent e48b7a9 commit 35bb0c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
10 changes: 7 additions & 3 deletions qml/delegates/Session.qml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@ ListItem {
}
}

function remove() {
console.log("Remove all messages")
function remove(contentItem) {
contentItem.remorseAction(qsTr("Deleting all messages"),
function() {
console.log("Deleting all messages for session: "+model.id)
whisperfish.deleteAllMessages(model.id)
})
}

Component {
Expand All @@ -119,7 +123,7 @@ ListItem {
id: menu
MenuItem {
text: qsTr("Delete Conversation")
onClicked: remove()
onClicked: remove(menu.parent)
}
}
}
Expand Down
11 changes: 0 additions & 11 deletions qml/pages/MessagesView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,6 @@ SilicaListView {
})
}
}
MenuItem {
text: qsTr("Delete All")
onClicked: {
remorse.execute(qsTr("Deleting All Messages"),
function() {
console.log("Deleting all messages for session: "+messageModel.sid)
whisperfish.deleteAllMessages(messageModel.sid)
mainWindow.showMainPage(PageStackAction.Immediate)
})
}
}
}

VerticalScrollDecorator {}
Expand Down

0 comments on commit 35bb0c8

Please sign in to comment.