Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #678 #709

Merged
merged 3 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading