Am empty note is not a valid note
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 28 Jan 2020 11:07:53 +0000 (12:07 +0100)
committerRoeland Jago Douma <rullzer@users.noreply.github.com>
Tue, 28 Jan 2020 11:46:15 +0000 (12:46 +0100)
Do not show the note edit field for empty new shares.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
src/gui/sharelinkwidget.cpp

index 62ed18da8bd7f2098fe762b117df725755d757be..8effcda2012552baa0b9de40ba4dff8c6e8607b6 100644 (file)
@@ -190,7 +190,7 @@ void ShareLinkWidget::setupUiOptions()
     _noteLinkAction = _linkContextMenu->addAction(tr("Add note to recipient"));
     _noteLinkAction->setCheckable(true);
 
-    if (_linkShare->getNote().isSimpleText()) {
+    if (_linkShare->getNote().isSimpleText() && !_linkShare->getNote().isEmpty()) {
         _ui->textEdit_note->setText(_linkShare->getNote());
         _noteLinkAction->setChecked(true);
         showNoteOptions(true);