mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
fixed deletion of outgoing messages
This commit is contained in:
parent
bc0bef07de
commit
992d5c30d3
1 changed files with 6 additions and 5 deletions
|
@ -1176,17 +1176,18 @@ void MessagesDialog::removemessage()
|
||||||
|
|
||||||
bool doDelete = false;
|
bool doDelete = false;
|
||||||
int listrow = ui.listWidget->currentRow();
|
int listrow = ui.listWidget->currentRow();
|
||||||
if (listrow == ROW_TRASHBOX)
|
|
||||||
|
if(listrow == ROW_TRASHBOX || (QApplication::keyboardModifiers() & Qt::ShiftModifier))
|
||||||
doDelete = true;
|
doDelete = true;
|
||||||
|
|
||||||
if(listrow == ROW_OUTBOX)
|
if(listrow == ROW_OUTBOX)
|
||||||
{
|
{
|
||||||
QMessageBox::warning(nullptr,tr("Deletion impossible"),tr("Messages in this box are automatically deleted when received."));
|
if(QMessageBox::question(nullptr,tr("Deletion is not recommended"),tr("Messages in this box are automatically deleted when received. Manually deleting a message does not guaranty that the message will not be delivered. Messages that cannot be delivered will however stay here indefinitly. Do you want to proceed and delete?"))
|
||||||
return ;
|
!= QMessageBox::Yes)
|
||||||
}
|
return ;
|
||||||
|
|
||||||
if (QApplication::keyboardModifiers() & Qt::ShiftModifier)
|
|
||||||
doDelete = true;
|
doDelete = true;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (const QString& m, selectedMessages) {
|
foreach (const QString& m, selectedMessages) {
|
||||||
if (doDelete) {
|
if (doDelete) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue