Get better logs if crash

hh
Laurent 5 years ago
parent 44db39c743
commit 06d9483054
  1. 2
      app/build.gradle
  2. 7
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/HandHistoryAdapter.kt
  3. 2
      app/standard/release/output.json

@ -34,7 +34,7 @@ android {
applicationId "net.pokeranalytics.android"
minSdkVersion 23
targetSdkVersion 28
versionCode 89
versionCode 91
versionName "5.0_alpha_1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

@ -269,7 +269,9 @@ class HandHistoryAdapter(
}
val row = dataSource.rowRepresentableForPosition(currentPosition)
?: throw PAIllegalStateException("Row Representable not found at index: $currentPosition")
delegate?.onItemClick(currentPosition, row, button.tag as Int)
val tag = button.tag as? Int ?: throw PAIllegalStateException("Button has no tag, text: ${button.text}, ref: $button")
delegate?.onItemClick(currentPosition, row, tag)
}
}
@ -289,7 +291,8 @@ class HandHistoryAdapter(
// Player
val listener = View.OnClickListener {
delegate?.onItemClick(position, row, playerImageView.tag as Int)
val tag = playerImageView.tag as? Int ?: throw PAIllegalStateException("playerImageView has no tag, position: $position, row: $row, ref: $playerImageView")
delegate?.onItemClick(position, row, tag)
}
playerImageView.setOnImageClickListener(listener)

@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":89,"versionName":"5.0_alpha_1","enabled":true,"outputFile":"PokerAnalytics_5.0_alpha_1(89)_200625_1422_release.apk","fullName":"standardRelease","baseName":"standard-release","dirName":""},"path":"PokerAnalytics_5.0_alpha_1(89)_200625_1422_release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":90,"versionName":"5.0_alpha_1","enabled":true,"outputFile":"PokerAnalytics_5.0_alpha_1(90)_200701_0910_release.apk","fullName":"standardRelease","baseName":"standard-release","dirName":""},"path":"PokerAnalytics_5.0_alpha_1(90)_200701_0910_release.apk","properties":{}}]
Loading…
Cancel
Save