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

#377 #386

Merged
merged 2 commits into from
Aug 22, 2019
Merged

#377 #386

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class CsvExporter(private val context: Context, database: AppDatabase) {
csv.add(context.getString(R.string.passe))
csv.add(context.getString(R.string.timestamp))
csv.add(context.getString(R.string.points))
csv.add(context.getString(R.string.arrow_numbers))
csv.add("x")
csv.add("y")
csv.newLine()
Expand Down Expand Up @@ -114,11 +115,13 @@ class CsvExporter(private val context: Context, database: AppDatabase) {
csv.add((e.index + 1).toString())
// Timestamp
csv.add(e.saveTime!!.format(DateTimeFormatter.ISO_LOCAL_TIME))
for ((_, index, _, x, y, scoringRing) in endDAO.loadShots(e.id)) {
for ((_, index, _, x, y, scoringRing, arrowNumber) in endDAO.loadShots(e.id)) {
csv.enterScope()
// Score
csv.add(target.zoneToString(scoringRing, index))

csv.add(if (arrowNumber == null) "" else arrowNumber)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the more compact ?: instead

arrowNumber ?: ""

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code was changed


// Coordinates (X, Y)
csv.add(x.toString())
csv.add(y.toString())
Expand Down