Disable options in share dialog if account state changes.
authorCamila San <hello@camila.codes>
Fri, 12 Apr 2019 09:52:02 +0000 (11:52 +0200)
committerCamila San <hello@camila.codes>
Fri, 12 Apr 2019 12:17:58 +0000 (14:17 +0200)
Signed-off-by: Camila San <hello@camila.codes>
src/gui/sharedialog.cpp

index f7e25173ac6db4af37e9f80dc4628ad4d3a20248..4a62f5885cfc0629444903fc0459c247c3e6aee5 100644 (file)
@@ -219,6 +219,7 @@ void ShareDialog::slotAdjustScrollWidgetSize()
 
 ShareDialog::~ShareDialog()
 {
+    _linkWidgetList.clear();
     delete _ui;
 }
 
@@ -327,6 +328,10 @@ void ShareDialog::slotAccountStateChanged(int state)
         _userGroupWidget->setEnabled(enabled);
     }
 
-
+    if(_linkWidgetList.size() > 0){
+        foreach(ShareLinkWidget *widget, _linkWidgetList){
+            widget->setEnabled(state);
+        }
+    }
 }
 }