import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import androidx.annotation.NonNull;
+
import static net.ktnx.mobileledger.utils.Logger.debug;
"<span class=\"[^\"]*\\bamount\\b[^\"]*\">\\s*([-+]?[\\d.,]+)(?:\\s+(\\S+))?</span>");
private MobileLedgerProfile profile;
public RetrieveTransactionsTask(WeakReference<MainActivity> contextRef,
- MobileLedgerProfile profile) {
+ @NonNull MobileLedgerProfile profile) {
this.contextRef = contextRef;
this.profile = profile;
}
Logger.debug("db", "Ignoring request for transaction retrieval - already active");
return;
}
+ MobileLedgerProfile pr = profile.getValue();
+ if (pr == null) throw new IllegalStateException("No current profile");
+
retrieveTransactionsTask =
new RetrieveTransactionsTask(new WeakReference<>(activity), profile.getValue());
Logger.debug("db", "Created a background transaction retrieval task");