String input = String.valueOf(b.accountRowAccAmounts.getText());
input = input.replace(decimalSeparator, decimalDot);
final String newText = String.format("%4.2f", Float.parseFloat(input));
- if (!newText.equals(input))
- b.accountRowAccAmounts.setText(newText);
+ if (!newText.equals(input)) {
+ boolean wasSyncingData = syncingData;
+ syncingData = true;
+ try {
+ b.accountRowAccAmounts.setText(newText);
+ }
+ finally {
+ syncingData = wasSyncingData;
+ }
+ }
}
catch (NumberFormatException ex) {
// ignored
return false;
}
+ if (getAdapterPosition() < 0) {
+ // probably the row was swiped out
+ Logger.debug("new-trans", "Ignoring request to suncData(): adapter position negative");
+ return false;
+ }
+
NewTransactionModel.Item item = getItem();
syncingData = true;
else
currValue = curr;
- if (!significantChange && !TextUtils.equals(acc.getCurrency(), currValue))
+ if (!significantChange && !Misc.equalStrings(acc.getCurrency(), currValue))
significantChange = true;
acc.setCurrency(currValue);
}
final String incomingAccountName = acc.getAccountName();
final String presentAccountName = String.valueOf(b.accountRowAccName.getText());
- if (!TextUtils.equals(incomingAccountName, presentAccountName)) {
+ if (!Misc.equalStrings(incomingAccountName, presentAccountName)) {
Logger.debug("bind",
String.format("Setting account name from '%s' to '%s' (| @ %d)",
presentAccountName, incomingAccountName,