summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/android')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/GameAdapter.kt13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/GameAdapter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/GameAdapter.kt
index 0295801ad..d4613fa8c 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/GameAdapter.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/GameAdapter.kt
@@ -77,11 +77,6 @@ class GameAdapter(private val activity: AppCompatActivity) : RecyclerView.Adapte
77 } 77 }
78 } 78 }
79 79
80 holder.binding.textGameTitle.text =
81 cursor!!.getString(GameDatabase.GAME_COLUMN_TITLE)
82 .replace("[\\t\\n\\r]+".toRegex(), " ")
83 holder.binding.textGameCaption.text = cursor!!.getString(GameDatabase.GAME_COLUMN_CAPTION)
84
85 // TODO These shouldn't be necessary once the move to a DB-based model is complete. 80 // TODO These shouldn't be necessary once the move to a DB-based model is complete.
86 val game = Game( 81 val game = Game(
87 cursor!!.getString(GameDatabase.GAME_COLUMN_TITLE), 82 cursor!!.getString(GameDatabase.GAME_COLUMN_TITLE),
@@ -92,6 +87,14 @@ class GameAdapter(private val activity: AppCompatActivity) : RecyclerView.Adapte
92 cursor!!.getString(GameDatabase.GAME_COLUMN_CAPTION) 87 cursor!!.getString(GameDatabase.GAME_COLUMN_CAPTION)
93 ) 88 )
94 holder.game = game 89 holder.game = game
90
91 holder.binding.textGameTitle.text = game.title.replace("[\\t\\n\\r]+".toRegex(), " ")
92 holder.binding.textGameCaption.text = game.company
93
94 if (game.company.isEmpty()) {
95 holder.binding.textGameCaption.visibility = View.GONE
96 }
97
95 val backgroundColorId = 98 val backgroundColorId =
96 if (isValidGame(holder.game.path)) R.attr.colorSurface else R.attr.colorErrorContainer 99 if (isValidGame(holder.game.path)) R.attr.colorSurface else R.attr.colorErrorContainer
97 val itemView = holder.itemView 100 val itemView = holder.itemView