-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/fix file import crash (#248)
* Make snakbar reusable * Move use case to View model * Show error instead of crashing when copying fails * Refactor * Add new line * Refactor * Suppress detekt
- Loading branch information
1 parent
04e515d
commit ac94ce2
Showing
8 changed files
with
128 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/michaeltroger/gruenerpass/certificates/dialogs/CertificateErrors.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.michaeltroger.gruenerpass.certificates.dialogs | ||
|
||
import android.view.View | ||
import com.google.android.material.snackbar.Snackbar | ||
import com.michaeltroger.gruenerpass.R | ||
import javax.inject.Inject | ||
|
||
interface CertificateErrors { | ||
fun showFileErrorSnackbar(view: View) | ||
} | ||
|
||
class CertificateErrorsImpl @Inject constructor() : CertificateErrors { | ||
override fun showFileErrorSnackbar(view: View) { | ||
Snackbar.make(view, R.string.error_reading_pdf, Snackbar.LENGTH_LONG).show() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters