Skip to content

Commit

Permalink
NF: rename files to decks
Browse files Browse the repository at this point in the history
I suspect that long ago `files` name made sense, maybe when there was
a single deck. That's clearer for today's implementation
  • Loading branch information
Arthur-Milchior authored and lukstbit committed Nov 11, 2024
1 parent b269abb commit 7dfec9b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class DeckPickerTest : InstrumentedTest() {
createDeckWithCard(testString)

// Go to RecyclerView item having "Test Deck" and click on the counts layout
onView(withId(R.id.files)).perform(
onView(withId(R.id.decks)).perform(
RecyclerViewActions.actionOnItem<RecyclerView.ViewHolder>(
hasDescendant(withText("TestDeck$testString")),
clickChildViewWithId(R.id.counts_layout)
Expand Down Expand Up @@ -114,7 +114,7 @@ class DeckPickerTest : InstrumentedTest() {
onView(withText(R.string.dialog_ok)).perform(click())

// The deck is currently empty, so if we tap on it, it becomes the selected deck but doesn't enter
onView(withId(R.id.files)).perform(
onView(withId(R.id.decks)).perform(
RecyclerViewActions.actionOnItem<RecyclerView.ViewHolder>(
hasDescendant(withText("TestDeck$testString")),
clickChildViewWithId(R.id.counts_layout)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ class ReviewerFragmentTest : InstrumentedTest() {
}

private fun clickOnDeckWithName(deckName: String) {
onView(withId(R.id.files)).checkWithTimeout(matches(hasDescendant(withText(deckName))))
onView(withId(R.id.files)).perform(
onView(withId(R.id.decks)).checkWithTimeout(matches(hasDescendant(withText(deckName))))
onView(withId(R.id.decks)).perform(
RecyclerViewActions.actionOnItem<RecyclerView.ViewHolder>(
hasDescendant(withText(deckName)),
click()
Expand Down
4 changes: 2 additions & 2 deletions AnkiDroid/src/androidTest/java/com/ichi2/anki/ReviewerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ class ReviewerTest : InstrumentedTest() {
}

private fun clickOnDeckWithName(deckName: String) {
onView(withId(R.id.files)).checkWithTimeout(matches(hasDescendant(withText(deckName))))
onView(withId(R.id.files)).perform(
onView(withId(R.id.decks)).checkWithTimeout(matches(hasDescendant(withText(deckName))))
onView(withId(R.id.decks)).perform(
RecyclerViewActions.actionOnItem<RecyclerView.ViewHolder>(
hasDescendant(withText(deckName)),
click()
Expand Down
2 changes: 1 addition & 1 deletion AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ open class DeckPicker :
title = resources.getString(R.string.app_name)

deckPickerContent = findViewById(R.id.deck_picker_content)
recyclerView = findViewById(R.id.files)
recyclerView = findViewById(R.id.decks)
noDecksPlaceholder = findViewById(R.id.no_decks_placeholder)

deckPickerContent.visibility = View.GONE
Expand Down
2 changes: 1 addition & 1 deletion AnkiDroid/src/main/res/layout/deck_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:orientation="vertical">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/files"
android:id="@+id/decks"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
Expand Down

0 comments on commit 7dfec9b

Please sign in to comment.