Remove no longer needed safe call.

This commit is contained in:
tzugen 2021-05-06 12:40:49 +02:00
parent 7b7f470667
commit 8ebd53a8eb
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
2 changed files with 2 additions and 2 deletions

View File

@ -320,7 +320,7 @@ class EditServerFragment : Fragment(), OnBackPressedHandler {
// Execute a ping to retrieve the API version.
// This is accepted to fail if the authentication is incorrect yet.
var pingResponse = subsonicApiClient.api.ping().execute()
if (pingResponse?.body() != null) {
if (pingResponse.body() != null) {
val restApiVersion = pingResponse.body()!!.version.restApiVersion
currentServerSetting!!.minimumApiVersion = restApiVersion
Timber.i("Server minimum API version set to %s", restApiVersion)

View File

@ -26,7 +26,7 @@ class ApiCallResponseChecker(
if (activeServerProvider.getActiveServer().minimumApiVersion == null) {
try {
val response = subsonicAPIClient.api.ping().execute()
if (response?.body() != null) {
if (response.body() != null) {
val restApiVersion = response.body()!!.version.restApiVersion
Timber.i("Server minimum API version set to %s", restApiVersion)
activeServerProvider.setMinimumApiVersion(restApiVersion)