diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index c21be47..8c13c80 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -169,6 +169,7 @@ int main(int argc, char **argv) ChannelSidePanel::addChannel(channel); channels.push_back(channel); Channel::setCurrent(channel); + lastFocusedTimer.restart(); if(localUser->type == User::Type::OFFLINE) { @@ -196,7 +197,8 @@ int main(int argc, char **argv) if(*request.nodeHash == *channel->getNodeInfo().getRequestHash()) { channelAddStoredMessage(channel, *request.requestHash, *request.creatorPublicKey, StringView((const char*)request.decryptedData.data, request.decryptedData.size), request.timestamp); - lastFocusedTimer.restart(); + if(channel == Channel::getCurrent()) + lastFocusedTimer.restart(); return; } } @@ -221,7 +223,8 @@ int main(int argc, char **argv) return; } - lastFocusedTimer.restart(); + if(channel == Channel::getCurrent()) + lastFocusedTimer.restart(); if(*request.userToAddPublicKey == nodeUserData->second.userKeyPair->getPublicKey()) { |