Skip to content
Closed
Changes from all commits
Commits
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
12 changes: 5 additions & 7 deletions AnkiDroid/src/main/java/com/ichi2/anki/SharedDecksActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,11 @@ class SharedDecksActivity : AnkiActivity() {
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == R.id.home) {
// R.id.home refers to a custom 'home' menu item defined in your app resources (res/menu/...).
shouldHistoryBeCleared = true
webView.loadUrl(resources.getString(R.string.shared_decks_url))
} else if (item.itemId == android.R.id.home) {
// android.R.id.home refers to the system-provided "up" button in the app toolbar
onBackPressedCallback.isEnabled = false
when (item.itemId) {
R.id.home -> {
shouldHistoryBeCleared = true
webView.loadUrl(resources.getString(R.string.shared_decks_url))
}
Comment on lines -263 to +267
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to fix the issue OP raise then this would make the behaviour of back button and the navigation button in toolbar same but if we want them to act differenly then I think this PR and the issue can be closed, but its gonna be confusing and I think thats why @Arthur-Milchior raised that issue, leaving to reviewers

}
return super.onOptionsItemSelected(item)
}
Expand Down