Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Updated to 1.2.20 EAP 33
Browse files Browse the repository at this point in the history
  • Loading branch information
DreierF committed Jan 3, 2018
1 parent e6b2e5e commit 3dbd39d
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import android.widget.RelativeLayout
import de.dreier.mytargets.R
import de.dreier.mytargets.databinding.ViewChipsBinding
import de.dreier.mytargets.shared.utils.RoundedAvatarDrawable
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize

@SuppressLint("ParcelCreator")
Expand All @@ -39,7 +40,8 @@ class Tag @JvmOverloads constructor(
var image: ByteArray? = null,
var isChecked: Boolean = true) : Parcelable {

@Transient private var thumbnail: Bitmap? = null
@IgnoredOnParcel
private var thumbnail: Bitmap? = null

val drawable: Drawable?
get() {
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@

buildscript {
ext.androidPluginVersion = '3.0.1'
ext.kotlinVersion = '1.2.10'
ext.kotlinVersion = '1.2.20-eap-33'
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
}

dependencies {
Expand All @@ -46,6 +47,7 @@ allprojects {
google()
maven { url 'https://jitpack.io' }
maven { url 'https://clojars.org/repo/' }
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import de.dreier.mytargets.shared.targets.drawable.TargetDrawable
import de.dreier.mytargets.shared.targets.drawable.TargetImpactAggregationDrawable
import de.dreier.mytargets.shared.targets.models.TargetModelBase
import de.dreier.mytargets.shared.targets.scoringstyle.ScoringStyle
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize

/**
Expand All @@ -39,8 +40,11 @@ data class Target(
var diameter: Dimension = Dimension.UNKNOWN
) : IIdProvider, IImageProvider, IDetailProvider, Comparable<Target>, Parcelable {

@IgnoredOnParcel
val model: TargetModelBase by lazy { TargetFactory.getTarget(id.toInt()) }
@IgnoredOnParcel
val drawable: TargetDrawable by lazy { TargetDrawable(this) }
@IgnoredOnParcel
val impactAggregationDrawable: TargetImpactAggregationDrawable by lazy {
TargetImpactAggregationDrawable(this)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import de.dreier.mytargets.shared.AppDatabase
import de.dreier.mytargets.shared.models.*
import de.dreier.mytargets.shared.utils.typeconverters.DimensionConverter
import de.dreier.mytargets.shared.utils.typeconverters.ThumbnailConverter
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize

@SuppressLint("ParcelCreator")
Expand Down Expand Up @@ -77,7 +78,7 @@ data class Arrow(@Column(name = "_id")
@Column(typeConverter = ThumbnailConverter::class)
var thumbnail: Thumbnail? = null) : BaseModel(), IImageProvider, IIdSettable, Comparable<Arrow>, IRecursiveModel, Parcelable {

@Transient
@IgnoredOnParcel
var images: List<ArrowImage>? = null

val drawable: Drawable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import de.dreier.mytargets.shared.AppDatabase
import de.dreier.mytargets.shared.models.*
import de.dreier.mytargets.shared.utils.typeconverters.EBowTypeConverter
import de.dreier.mytargets.shared.utils.typeconverters.ThumbnailConverter
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize

@SuppressLint("ParcelCreator")
Expand Down Expand Up @@ -112,10 +113,10 @@ data class Bow(
var thumbnail: Thumbnail? = null
) : BaseModel(), IImageProvider, IIdSettable, Comparable<Bow>, IRecursiveModel, Parcelable {

@Transient
@IgnoredOnParcel
var images: List<BowImage>? = null

@Transient
@IgnoredOnParcel
var sightMarks: MutableList<SightMark>? = null

val drawable: Drawable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import de.dreier.mytargets.shared.models.IRecursiveModel
import de.dreier.mytargets.shared.models.SelectableZone
import de.dreier.mytargets.shared.models.Target
import de.dreier.mytargets.shared.utils.typeconverters.LocalTimeConverter
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize
import org.threeten.bp.LocalTime
import java.util.*
Expand Down Expand Up @@ -58,10 +59,10 @@ data class End(
var comment: String? = ""
) : BaseModel(), IIdSettable, Comparable<End>, IRecursiveModel, Parcelable {

@Transient
@IgnoredOnParcel
var images: MutableList<EndImage>? = null

@Transient
@IgnoredOnParcel
internal var shots: MutableList<Shot>? = null

val isEmpty: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import de.dreier.mytargets.shared.AppDatabase
import de.dreier.mytargets.shared.models.*
import de.dreier.mytargets.shared.models.Target
import de.dreier.mytargets.shared.utils.typeconverters.DimensionConverter
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize
import java.util.*

Expand Down Expand Up @@ -65,7 +66,7 @@ data class Round(
var targetDiameter: Dimension = Dimension.UNKNOWN
) : BaseModel(), IIdSettable, Comparable<Round>, IRecursiveModel, Parcelable {

@Transient
@IgnoredOnParcel
var ends: MutableList<End>? = null

constructor(info: RoundTemplate) : this(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import de.dreier.mytargets.shared.models.IDetailProvider
import de.dreier.mytargets.shared.models.IIdSettable
import de.dreier.mytargets.shared.models.IImageProvider
import de.dreier.mytargets.shared.targets.drawable.CombinedSpot
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize

@SuppressLint("ParcelCreator")
Expand All @@ -49,7 +50,8 @@ data class StandardRound(
override var name: String = ""
) : BaseModel(), IIdSettable, IImageProvider, IDetailProvider, Comparable<StandardRound>, Parcelable {

@Transient internal var rounds: MutableList<RoundTemplate>? = null
@IgnoredOnParcel
internal var rounds: MutableList<RoundTemplate>? = null

val targetDrawable: Drawable
get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import de.dreier.mytargets.shared.AppDatabase
import de.dreier.mytargets.shared.models.*
import de.dreier.mytargets.shared.utils.typeconverters.EWeatherConverter
import de.dreier.mytargets.shared.utils.typeconverters.LocalDateConverter
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize
import org.threeten.bp.LocalDate
import org.threeten.bp.format.DateTimeFormatter
Expand Down Expand Up @@ -83,7 +84,7 @@ data class Training(
var witnessSignatureId: Long? = null
) : BaseModel(), IIdSettable, Comparable<Training>, IRecursiveModel, Parcelable {

@Transient
@IgnoredOnParcel
var rounds: MutableList<Round>? = null

var environment: Environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import android.view.View
import android.view.animation.AccelerateDecelerateInterpolator
import de.dreier.mytargets.shared.models.Target
import de.dreier.mytargets.shared.models.db.Shot
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize

@SuppressLint("ParcelCreator")
Expand All @@ -40,19 +41,19 @@ class EndRenderer(
private var ambientMode: Boolean = false
) : Parcelable {

@Transient private var circle: Circle? = null
@Transient private var parent: View? = null
@Transient private var rect: RectF? = null
@Transient private var radius: Int = 0
@Transient private var grayBackground = Paint()
@Transient private var density: Float = 0.toFloat()
@Transient private var shotsPerRow: Int = 0
@Transient private var rowHeight: Float = 0.toFloat()
@Transient private var columnWidth: Float = 0.toFloat()
@Transient private var oldRadius: Int = 0
@Transient private var oldSelected: Int = 0
@Transient private var oldSelectedRadius: Int = 0
@Transient private lateinit var target: Target
@IgnoredOnParcel private var circle: Circle? = null
@IgnoredOnParcel private var parent: View? = null
@IgnoredOnParcel private var rect: RectF? = null
@IgnoredOnParcel private var radius: Int = 0
@IgnoredOnParcel private var grayBackground = Paint()
@IgnoredOnParcel private var density: Float = 0.toFloat()
@IgnoredOnParcel private var shotsPerRow: Int = 0
@IgnoredOnParcel private var rowHeight: Float = 0.toFloat()
@IgnoredOnParcel private var columnWidth: Float = 0.toFloat()
@IgnoredOnParcel private var oldRadius: Int = 0
@IgnoredOnParcel private var oldSelected: Int = 0
@IgnoredOnParcel private var oldSelectedRadius: Int = 0
@IgnoredOnParcel private lateinit var target: Target

private val animator: ValueAnimator
get() {
Expand Down

0 comments on commit 3dbd39d

Please sign in to comment.