diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-04-02 22:42:59 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:48 +0200 |
commit | ac417a4ffabea0227572e9900d4b0e6f160087cc (patch) | |
tree | e9bbc22ccfad9cc147e0629e2fe3f6c7d8dd938b | |
parent | android: Fix check for ok text in software keyboard (diff) | |
download | yuzu-ac417a4ffabea0227572e9900d4b0e6f160087cc.tar yuzu-ac417a4ffabea0227572e9900d4b0e6f160087cc.tar.gz yuzu-ac417a4ffabea0227572e9900d4b0e6f160087cc.tar.bz2 yuzu-ac417a4ffabea0227572e9900d4b0e6f160087cc.tar.lz yuzu-ac417a4ffabea0227572e9900d4b0e6f160087cc.tar.xz yuzu-ac417a4ffabea0227572e9900d4b0e6f160087cc.tar.zst yuzu-ac417a4ffabea0227572e9900d4b0e6f160087cc.zip |
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/adapters/GameAdapter.kt | 13 |
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 } } - holder.binding.textGameTitle.text = - cursor!!.getString(GameDatabase.GAME_COLUMN_TITLE) - .replace("[\\t\\n\\r]+".toRegex(), " ") - holder.binding.textGameCaption.text = cursor!!.getString(GameDatabase.GAME_COLUMN_CAPTION) - // TODO These shouldn't be necessary once the move to a DB-based model is complete. val game = Game( cursor!!.getString(GameDatabase.GAME_COLUMN_TITLE), @@ -92,6 +87,14 @@ class GameAdapter(private val activity: AppCompatActivity) : RecyclerView.Adapte cursor!!.getString(GameDatabase.GAME_COLUMN_CAPTION) ) holder.game = game + + holder.binding.textGameTitle.text = game.title.replace("[\\t\\n\\r]+".toRegex(), " ") + holder.binding.textGameCaption.text = game.company + + if (game.company.isEmpty()) { + holder.binding.textGameCaption.visibility = View.GONE + } + val backgroundColorId = if (isValidGame(holder.game.path)) R.attr.colorSurface else R.attr.colorErrorContainer val itemView = holder.itemView |