Эх сурвалжийг харах

Avoid redundant call to getConnectivity()

[Broken Windows Theory] avoid calling getConnectivity() a second time, since the object is still fresh in the else branch of the check for WiFi.
Luca Santarelli 3 жил өмнө
parent
commit
c7ca196631

+ 1 - 1
src/main/java/com/nextcloud/client/network/ConnectivityServiceImpl.java

@@ -81,7 +81,7 @@ class ConnectivityServiceImpl implements ConnectivityService {
 
             return result;
         } else {
-            return !getConnectivity().isConnected();
+            return !c.isConnected();
         }
     }