Skip to content

Commit

Permalink
Tap in "cancel" button open games activity
Browse files Browse the repository at this point in the history
  • Loading branch information
WSTxda committed Sep 19, 2024
1 parent df5c5fe commit 952b757
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/src/main/java/com/wstxda/gsl/shortcut/GamesActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ class GamesActivity : AppCompatActivity() {
if (!sharedPreferences.getBoolean(SHEET_SHOWN_PREF_KEY, false)) {
showAssistantBottomSheet()
} else {
launchGameManagerBrands()
launchGamesActivity()
}
}

private fun launchGameManagerBrands() {
val useGameManager = sharedPreferences.getBoolean(GAME_MANAGER_PREF_KEY, false)
if (useGameManager) {
val gameManager = GamesBrandsPackages(this)
if (!gameManager.launchGameManager()) {
private fun launchGamesActivity() {
val useGameDeviceManager = sharedPreferences.getBoolean(GAME_MANAGER_PREF_KEY, false)
if (useGameDeviceManager) {
val launchDeviceGameManager = GamesBrandsPackages(this)
if (!launchDeviceGameManager.launchGameManager()) {
showMessage(R.string.game_manager_not_found)
}
} else {
Expand Down Expand Up @@ -93,6 +93,7 @@ class GamesActivity : AppCompatActivity() {
bottomSheetView.findViewById<Button>(R.id.cancel_button).setOnClickListener {
markDialogAsShown()
bottomSheetDialog.dismiss()
launchGamesActivity()
finishActivity()
}

Expand Down

0 comments on commit 952b757

Please sign in to comment.