summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/plugins/facebook/facebookconnectwidget.cpp')
-rw-r--r--desktop-widgets/plugins/facebook/facebookconnectwidget.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
index b4f306609..37da1c018 100644
--- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
+++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
@@ -300,6 +300,16 @@ void FacebookManager::uploadFinished()
emit sendDiveFinished();
}
+void FacebookConnectWidget::showEvent(QShowEvent *event)
+{
+ if (FacebookManager::instance()->loggedIn()) {
+ facebookLoggedIn();
+ } else {
+ facebookDisconnect();
+ }
+ return QDialog::showEvent(event);
+}
+
FacebookConnectWidget::FacebookConnectWidget(QWidget *parent) : QDialog(parent), ui(new Ui::FacebookConnectWidget) {
ui->setupUi(this);
FacebookManager *fb = FacebookManager::instance();
@@ -309,11 +319,6 @@ FacebookConnectWidget::FacebookConnectWidget(QWidget *parent) : QDialog(parent),
facebookWebView = new QWebView(this);
#endif
ui->fbWebviewContainer->layout()->addWidget(facebookWebView);
- if (fb->loggedIn()) {
- facebookLoggedIn();
- } else {
- facebookDisconnect();
- }
#ifdef USE_WEBENGINE
connect(facebookWebView, &QWebEngineView::urlChanged, fb, &FacebookManager::tryLogin);
#else