Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
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 @@ -43,26 +43,26 @@ class DocumentAnalyzer @JvmOverloads internal constructor(
filename = null,
documentType = null
).mapSuccess { partialDocumentResource ->
Log.d("gini-api", "Partial document created: " + partialDocumentResource.data.id)
Log.d(LOG_TAG, "Partial document created: " + partialDocumentResource.data.id)
Log.d(
"gini-api", "Creating composite document for partial document: " + partialDocumentResource.data.id
LOG_TAG, "Creating composite document for partial document: " + partialDocumentResource.data.id
)
documentManager.createCompositeDocument(listOf(partialDocumentResource.data))
}.mapSuccess { compositeDocumentResource ->
Log.d("gini-api", "Composite document created: " + compositeDocumentResource.data.id)
Log.d(LOG_TAG, "Composite document created: " + compositeDocumentResource.data.id)
giniApiDocument = compositeDocumentResource.data
Log.d(
"gini-api", "Getting extractions for composite document: " + compositeDocumentResource.data.id
LOG_TAG, "Getting extractions for composite document: " + compositeDocumentResource.data.id
)
documentManager.getAllExtractionsWithPolling(compositeDocumentResource.data)
}
when (extractionsResource) {
is Resource.Success -> {
Log.d("gini-api", "Analysis completed for document: ${giniApiDocument?.id}")
Log.d(LOG_TAG, "Analysis completed for document: ${giniApiDocument?.id}")
listener?.onExtractionsReceived(extractionsResource.data.specificExtractions)
}
is Resource.Error -> {
Log.d("gini-api", "Analysis failed for document ${giniApiDocument?.id}: ${extractionsResource!!.message}")
Log.d(LOG_TAG, "Analysis failed for document ${giniApiDocument?.id}: ${extractionsResource.message}")
listener?.onException(Exception(extractionsResource.message, extractionsResource.exception))
}
is Resource.Cancelled -> {}
Expand All @@ -82,4 +82,8 @@ class DocumentAnalyzer @JvmOverloads internal constructor(
fun onException(exception: Exception)
fun onExtractionsReceived(extractions: Map<String, SpecificExtraction>)
}

companion object {
private const val LOG_TAG = "gini-api"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ internal class DigitalInvoiceScreenPresenter(
}

override fun stop() {
// No-op
}

@VisibleForTesting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ internal sealed class ViewHolder<in T>(itemView: View, val viewType: ViewType) :
}

override fun unbind() {
/* no-op */
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import android.widget.EditText
internal fun EditText.doAfterTextChanged(afterTextChanged: (String) -> Unit): TextWatcher =
object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
/* no-op */
}

override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
/* no-op */
}

override fun afterTextChanged(editable: Editable?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ internal class LineItemDetailsScreenPresenter(
}

override fun stop() {
/* no-op */
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ internal class DigitalOnboardingScreenPresenter(
}

override fun start() {
/* no-op */
}

override fun stop() {
/* no-op */
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ interface DigitalInvoiceNavigationBarBottomAdapter : InjectedViewAdapter {
* Example value: "3% Skonto discount"
*/
fun onSkontoPercentageBadgeUpdated(text: String) {

/* no-op */
}

/**
Expand All @@ -57,7 +57,7 @@ interface DigitalInvoiceNavigationBarBottomAdapter : InjectedViewAdapter {
* @param isVisible visibility flag
*/
fun onSkontoPercentageBadgeVisibilityUpdate(isVisible: Boolean) {

/* no-op */
}

/**
Expand All @@ -67,7 +67,7 @@ interface DigitalInvoiceNavigationBarBottomAdapter : InjectedViewAdapter {
* Example value: `"Save 100.00 EUR"`
*/
fun onSkontoSavingsAmountUpdated(text: String) {

/* no-op */
}

/**
Expand All @@ -76,7 +76,7 @@ interface DigitalInvoiceNavigationBarBottomAdapter : InjectedViewAdapter {
* @param isVisible visibility flag
*/
fun onSkontoSavingsAmountVisibilityUpdated(isVisible: Boolean) {

/* no-op */
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ public Void apply(final AnalysisInteractor.ResultHolder resultHolder,
} else {
proceedWithExtractions(resultHolder);
}
break;
case NO_NETWORK_SERVICE:
break;
default:
Expand Down