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

Fixes an endless Market price field update on Android Swap (uplift to 1.38.x) #13024

Merged
merged 1 commit into from
Apr 16, 2022
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -1096,27 +1096,20 @@ public void onBackPressed() {
}

private TextWatcher getTextWatcherFromToValueText(boolean from) {
return new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (mFromValueText.hasFocus()) {
getSendSwapQuota(from, false);
}
}
return new FilterTextFromToValueText(from);
}

@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
private class FilterTextFromToValueText implements TextWatcher {
boolean mFrom;

@Override
public void afterTextChanged(Editable s) {}
};
}
public FilterTextFromToValueText(boolean from) {
mFrom = from;
}

private TextWatcher filterTextWatcherFrom = new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (mFromValueText.hasFocus()) {
getSendSwapQuota(true, false);
if (mFrom ? mFromValueText.hasFocus() : mToValueText.hasFocus()) {
getSendSwapQuota(mFrom, false);
}
}

Expand All @@ -1125,7 +1118,7 @@ public void beforeTextChanged(CharSequence s, int start, int count, int after) {

@Override
public void afterTextChanged(Editable s) {}
};
}

private class FilterTextWatcherSendToAddr implements TextWatcher {
Validations.SendToAccountAddress mValidator;
Expand Down