Don't use trayicon on android

This commit is contained in:
Tobias Fella
2020-11-23 00:03:49 +01:00
parent 9484a4c8de
commit 0b8db12543
5 changed files with 19 additions and 11 deletions

View File

@@ -46,6 +46,10 @@
#include "settings.h"
#include "utils.h"
#ifndef Q_OS_ANDROID
#include "trayicon.h"
#endif
Controller::Controller(QObject *parent)
: QObject(parent)
{
@@ -54,6 +58,14 @@ Controller::Controller(QObject *parent)
Connection::setRoomType<NeoChatRoom>();
Connection::setUserType<NeoChatUser>();
#ifndef Q_OS_ANDROID
TrayIcon *trayIcon = new TrayIcon(this);
connect(trayIcon, &TrayIcon::showWindow, this, &Controller::showWindow);
trayIcon->setVisible(true);
trayIcon->setIconSource(":/assets/img/icon.png");
trayIcon->setIsOnline(true);
#endif
QTimer::singleShot(0, this, [=] {
invokeLogin();
});