Explorar o código

Time to refresh cache from settings file.

Mihawk %!s(int64=12) %!d(string=hai) anos
pai
achega
643c1894d4
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      App.cpp

+ 4 - 2
App.cpp

@@ -521,12 +521,14 @@ void App::timerEvent(QTimerEvent *e)
 
     // HostNames scheduled daily refresh
     int currentHour = QTime::currentTime().hour();
-    if(currentHour == 21 && !myHostNamesRequested)
+    int refreshHour = Settings::globalInstance()->refreshHostNamesHour();
+    if(currentHour == refreshHour && !myHostNamesRequested)
     {
+      print("Refreshing hostname cache...\n");
       requestCachedHostNames();
       myHostNamesRequested = true;
     }
-    else if(currentHour != 21 && myHostNamesRequested)
+    else if(currentHour != refreshHour && myHostNamesRequested)
     {
       myHostNamesRequested = false;
     }