File tree Expand file tree Collapse file tree
src/main/java/org/ole/planet/myplanet/services/sync Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ android {
1111 applicationId " org.ole.planet.myplanet"
1212 minSdk = 26
1313 targetSdk = 36
14- versionCode = 4644
15- versionName = " 0.46.44 "
14+ versionCode = 4645
15+ versionName = " 0.46.45 "
1616 ndkVersion = ' 26.3.11579264'
1717 vectorDrawables. useSupportLibrary = true
1818 }
Original file line number Diff line number Diff line change @@ -40,10 +40,6 @@ class LoginSyncManager private constructor(
4040 withContext(Dispatchers .Main ) { listener.onSyncStarted() }
4141
4242 val apiInterface = ApiClient .client.create(ApiInterface ::class .java)
43- if (apiInterface == null ) {
44- withContext(Dispatchers .Main ) { listener.onSyncFailed(" Network client not available." ) }
45- return @launch
46- }
4743
4844 val authHeader = try {
4945 " Basic " + Base64 .encodeToString(" $userName :$password " .toByteArray(), Base64 .NO_WRAP )
@@ -137,9 +133,6 @@ class LoginSyncManager private constructor(
137133 `object `.add(" selector" , selector)
138134
139135 val apiInterface = ApiClient .client.create(ApiInterface ::class .java)
140- if (apiInterface == null ) {
141- return @launch
142- }
143136
144137 val header = UrlUtils .header
145138 if (header.isBlank()) {
@@ -160,7 +153,7 @@ class LoginSyncManager private constructor(
160153 settings.edit { putString(" communityLeaders" , " $responseBody " ) }
161154
162155 val array = JsonUtils .getJsonArray(" docs" , responseBody)
163- if (array != null && array .size() > 0 ) {
156+ if (array.size() > 0 ) {
164157 try {
165158 settings.edit { putString(" user_admin" , JsonUtils .gson.toJson(array[0 ])) }
166159 } catch (e: Exception ) {
You can’t perform that action at this time.
0 commit comments