|
@@ -30,6 +30,7 @@ namespace CliManager {
|
|
|
|
|
|
QMLHandler *qmlHandler;
|
|
QMLHandler *qmlHandler;
|
|
bool programActive = true;
|
|
bool programActive = true;
|
|
|
|
+bool loggedin = false;
|
|
int inpipefd[2];
|
|
int inpipefd[2];
|
|
int outpipefd[2];
|
|
int outpipefd[2];
|
|
|
|
|
|
@@ -164,17 +165,21 @@ void CliManager::readPipeLoop() {
|
|
|
|
|
|
void CliManager::notificationsLoop() {
|
|
void CliManager::notificationsLoop() {
|
|
while (programActive) {
|
|
while (programActive) {
|
|
- std::this_thread::sleep_for(std::chrono::milliseconds(3000));
|
|
|
|
- writeToCli("notifications");
|
|
|
|
- writeToCli("extendedlist");
|
|
|
|
|
|
+ std::this_thread::sleep_for(std::chrono::seconds(3));
|
|
|
|
+ if (loggedin) {
|
|
|
|
+ writeToCli("notifications");
|
|
|
|
+ writeToCli("extendedlist");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
void CliManager::statusLoop() {
|
|
void CliManager::statusLoop() {
|
|
while (programActive) {
|
|
while (programActive) {
|
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
|
- writeToCli("status");
|
|
|
|
- writeToCli("extendedstatus");
|
|
|
|
|
|
+ if (loggedin) {
|
|
|
|
+ writeToCli("status");
|
|
|
|
+ writeToCli("extendedstatus");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|