Skip to content

Commit

Permalink
settings: refactor towards more stability (fixes #2649) (#2655)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Oct 30, 2023
1 parent 3560dcf commit d4cb7c1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1120
versionName "0.11.20"
versionCode 1121
versionName "0.11.21"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ public void onResponse(Call<JsonObject> call, Response<JsonObject> response) {
community.setWeight(0);
}
community.setLocalDomain(JsonUtils.getString("localDomain", jsonDoc));
if (!id.contains("_design")){
community.setName(JsonUtils.getString("name", jsonDoc));
}
community.setName(JsonUtils.getString("name", jsonDoc));
community.setParentDomain(JsonUtils.getString("parentDomain", jsonDoc));
community.setRegistrationRequest(JsonUtils.getString("registrationRequest", jsonDoc));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,11 +756,13 @@ private void onChangeServerUrl() {
if (selected == null) {
return;
}
serverUrl.setText(selected.getLocalDomain());
protocol_checkin.check(R.id.radio_https);
settings.getString("serverProtocol", "https://");
serverPassword.setText(selected.getWeight() == 0 ? "0660" : "");
serverPassword.setEnabled(selected.getWeight() != 0);
if (selected.isValid()){
serverUrl.setText(selected.getLocalDomain());
protocol_checkin.check(R.id.radio_https);
settings.getString("serverProtocol", "https://");
serverPassword.setText(selected.getWeight() == 0 ? "0660" : "");
serverPassword.setEnabled(selected.getWeight() != 0);
}
} finally {
if (mRealm != null && !mRealm.isClosed()) {
mRealm.close();
Expand Down Expand Up @@ -936,4 +938,4 @@ public void afterTextChanged(Editable editable) {
public String getCustomDeviceName() {
return settings.getString("customDeviceName", NetworkUtils.getDeviceName());
}
}
}

0 comments on commit d4cb7c1

Please sign in to comment.