Skip to content

Commit 89a5058

Browse files
committed
Bump version to 0.4.0
1 parent 0902d1a commit 89a5058

File tree

4 files changed

+24
-20
lines changed

4 files changed

+24
-20
lines changed

app/src/main/kotlin/com/ediposouza/teslesgendstracker/ui/decks/DeckActivity.kt

+16-13
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import com.ediposouza.teslesgendstracker.interactor.PublicInteractor
3131
import com.ediposouza.teslesgendstracker.ui.base.BaseActivity
3232
import com.ediposouza.teslesgendstracker.ui.base.CmdShowSnackbarMsg
3333
import com.ediposouza.teslesgendstracker.ui.cards.CardActivity
34-
import com.ediposouza.teslesgendstracker.ui.decks.widget.DeckList
3534
import com.ediposouza.teslesgendstracker.ui.util.CircleTransform
3635
import com.ediposouza.teslesgendstracker.ui.util.KeyboardUtil
3736
import com.ediposouza.teslesgendstracker.util.*
@@ -455,19 +454,23 @@ class DeckActivity : BaseActivity() {
455454
val updateTime = deckUpdate.date.toLocalTime().format(DateTimeFormatter.ofPattern(TIME_PATTERN))
456455
deck_update_title.text = context.getString(R.string.deck_details_last_update_format, updateDate, updateTime)
457456
PublicInteractor.getCards(null, cls.attr1, cls.attr2, CardAttribute.DUAL, CardAttribute.NEUTRAL) { cards ->
458-
with(deck_update_changes) {
459-
val onItemClick = { view: View, card: Card -> showExpandedCard(context, card, view) }
460-
adapter = DeckList.DeckListAdapter({ }, onItemClick, { _, _ -> true }).apply {
461-
updateMode = true
462-
showDeck(deckUpdate.changes.map {
463-
val cardQtd = it
464-
CardSlot(cards.find { it.shortName == cardQtd.key }!!, it.value)
465-
})
466-
}
467-
layoutManager = LinearLayoutManager(context)
468-
setHasFixedSize(true)
469-
}
457+
configUpdateCardsChanges(cards, deckUpdate)
458+
}
459+
}
460+
}
461+
462+
private fun DeckUpdateViewHolder.configUpdateCardsChanges(cards: List<Card>, deckUpdate: DeckUpdate) {
463+
with(itemView.deck_update_changes) {
464+
val onItemClick = { view: View, card: Card -> showExpandedCard(context, card, view) }
465+
adapter = com.ediposouza.teslesgendstracker.ui.decks.widget.DeckList.DeckListAdapter({ }, onItemClick, { _, _ -> true }).apply {
466+
updateMode = true
467+
showDeck(deckUpdate.changes.map {
468+
val cardQtd = it
469+
com.ediposouza.teslesgendstracker.data.CardSlot(cards.find { it.shortName == cardQtd.key }!!, it.value)
470+
})
470471
}
472+
layoutManager = android.support.v7.widget.LinearLayoutManager(context)
473+
setHasFixedSize(true)
471474
}
472475
}
473476

app/src/release/java/com/ediposouza/teslesgendstracker/util/MetricsManager.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ object MetricsManager : MetricsConstants() {
6262
putString(action.PARAM_PATCH, action.patch)
6363
putString(action.PARAM_PRIVATE, action.private.toString())
6464
}
65-
is MetricAction.ACTION_NEW_DECK_UPDATE -> {
65+
is MetricAction.ACTION_DECK_UPDATE -> {
6666
putString(action.PARAM_TYPE, action.type)
6767
putString(action.PARAM_PATCH, action.patch)
6868
putString(action.PARAM_PRIVATE, action.private.toString())
@@ -79,9 +79,10 @@ object MetricsManager : MetricsConstants() {
7979
putString(action.PARAM_SEASON, action.season?.uuid ?: MetricAction.ALL)
8080
is MetricAction.ACTION_MATCH_STATISTICS_CLASS ->
8181
putString(action.PARAM_CLASS, action.cls.name)
82-
is MetricAction.ACTION_NEW_MATCH_START_WITH ->
82+
is MetricAction.ACTION_NEW_MATCH_START_WITH -> {
8383
putString(action.PARAM_DECK, action.deck?.cls?.name ?: action.PARAM_DECK_VALUE_OTHER)
84-
putBoolean(action.PARAM_FROM_ARENA, fromArena)
84+
putBoolean(action.PARAM_FROM_ARENA, action.fromArena)
85+
}
8586
is MetricAction.ACTION_NEW_MATCH_SAVE -> {
8687
putString(action.PARAM_MY_CLS, action.myDeckCls.name)
8788
putString(action.PARAM_MY_TYPE, action.myDeckType.name)

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
buildscript {
44
ext {
5-
appVersionName = "0.3.3"
6-
appVersionCode = 10
5+
appVersionName = "0.4.0"
6+
appVersionCode = 11
77

88
kotlin_version = "1.1.0-beta-38"
9-
prepareToRelease = false
9+
prepareToRelease = true
1010
}
1111

1212
repositories {

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ android.enableBuildCache=true
2121
kotlin.incremental=true
2222

2323
propsFile=../../AppsByEdipo.properties
24-
FirebaseServiceAccountFilePath=tes-legends-assistant-firebase-crashreporting-9kkud-bb17797192.json
24+
FirebaseServiceAccountFilePath=/Users/EdipoSouza/.gradle/tes-legends-assistant-firebase-crashreporting-9kkud-bb17797192.json

0 commit comments

Comments
 (0)