Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Deck Search" display now same as the Deck Viewer #10389

Merged
merged 4 commits into from
Feb 27, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
code refactoring
  • Loading branch information
viciousAegis committed Feb 27, 2022
commit a13268a559d0289ffb46f0acb176820a151e9cc4
Original file line number Diff line number Diff line change
@@ -321,9 +321,7 @@ open class DeckSelectionDialog : AnalyticsDialogFragment() {
* Eg: foo::bar -> \t\tbar
*/
val displayName: String // TODO should be a lazy value
get() {
return getDisplayName(name)
}
get() = getDisplayName(name)

constructor(deckId: Long, name: String) {
this.deckId = deckId
@@ -342,10 +340,7 @@ open class DeckSelectionDialog : AnalyticsDialogFragment() {
*/
private fun getDisplayName(name: String): String {
var nameArr = name.split("::")
viciousAegis marked this conversation as resolved.
Show resolved Hide resolved
var displayName = nameArr[nameArr.size - 1]
displayName = "\t\t".repeat(nameArr.size - 1) + displayName

return displayName
return "\t\t".repeat(nameArr.size - 1) + nameArr[nameArr.size - 1]
}

/** "All decks" comes first. Then usual deck name order. */