Skip to content

Commit

Permalink
Merge pull request #709 from PhenoApps/bugs/678/5.5cleanup
Browse files Browse the repository at this point in the history
fix #678
  • Loading branch information
trife authored Aug 15, 2023
2 parents cbf24f8 + aa918da commit 6324fec
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
10 changes: 4 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,16 @@ android {
buildTypes {

release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
// signingConfig signingConfigs.playStoreConfig //Add your own signing config
minifyEnabled false
debuggable false
//signingConfig signingConfigs.playStoreConfig //Add your own signing config
}

debug {
clean
debuggable true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
manifestPlaceholders = [crashlyticsCollectionEnabled: "false"]
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ private void loadSelectedDate() {
ObservationModel model = getCurrentObservation();
date = model.getValue();
log();
//afterLoadExists((CollectActivity) getContext(), date);
} catch (Exception e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -272,15 +273,19 @@ public void refreshLayout(Boolean onNew) {
if (!block() || isFirstLoad) {
isFirstLoad = false;
super.refreshLayout(onNew);
loadSelectedDate();
if (!onNew) {
ObservationModel model = getCurrentObservation();
if (model != null) {
date = getCurrentObservation().getValue();
}
refreshDateText(date);
}
} else {
Utils.makeToast(getContext(), getContext().getString(R.string.view_repeated_values_add_button_fail));
}
}

@Override
public void afterLoadExists(CollectActivity act, @Nullable String value) {
super.afterLoadExists(act, value);
private void refreshDateText(String value) {

//first check if observation values is observed for this plot and the value is not NA
if (value != null && !value.equals("NA")) {
Expand Down Expand Up @@ -333,6 +338,13 @@ public void afterLoadExists(CollectActivity act, @Nullable String value) {

forceDataSavedColor();
}
}

@Override
public void afterLoadExists(CollectActivity act, @Nullable String value) {
super.afterLoadExists(act, value);

refreshDateText(value);

isBlocked = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ class RepeatedValuesView(context: Context, attributeSet: AttributeSet) :

updateButtonVisibility()

act.traitLayoutRefresh()
Handler(Looper.getMainLooper()).postDelayed({

act.traitLayoutRefresh()

}, 100)
}
}

Expand All @@ -116,7 +120,11 @@ class RepeatedValuesView(context: Context, attributeSet: AttributeSet) :

updateButtonVisibility()

act.traitLayoutRefresh()
Handler(Looper.getMainLooper()).postDelayed({

act.traitLayoutRefresh()

}, 100)
}
}

Expand Down

0 comments on commit 6324fec

Please sign in to comment.