Skip to content

Commit

Permalink
feat: show snackbar if no data connection in shared deck download
Browse files Browse the repository at this point in the history
  • Loading branch information
criticalAY authored and david-allison committed Jan 5, 2025
1 parent de66d74 commit 5ff3c18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,11 @@ open class DeckPicker :
)

fun openAnkiWebSharedDecks() {
if (!NetworkUtils.isOnline) {
showSnackbar(R.string.check_network)
Timber.d("DeckPicker:: No network, Shared deck download failed")
return
}
val intent = Intent(this, SharedDecksActivity::class.java)
startActivity(intent)
}
Expand Down

0 comments on commit 5ff3c18

Please sign in to comment.