Skip to content

Commit

Permalink
OverviewFragment: also format absolute episode number
Browse files Browse the repository at this point in the history
  • Loading branch information
UweTrottmann committed Oct 25, 2024
1 parent 1d73deb commit c27b872
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
Releases marked with 🧪 (or previously with the "beta" suffix) were released on
[the beta program](https://github.com/UweTrottmann/SeriesGuide/wiki/Beta) only.

## Unreleased

* 🔧 Overview: use local number format for absolute episode number.

## Version 2024.4

### 2024.4.5 - 2024-10-23 🧪
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import timber.log.Timber
import java.text.NumberFormat

/**
* Displays general information about a show and, if there is one, the next episode to watch.
Expand Down Expand Up @@ -470,7 +471,9 @@ class OverviewFragment() : Fragment(), EpisodeActionsContract {
val episodeAbsoluteNumber = episode.absoluteNumber
if (episodeAbsoluteNumber != null
&& episodeAbsoluteNumber > 0 && episodeAbsoluteNumber != number) {
infoText.append(" (").append(episodeAbsoluteNumber).append(")")
infoText.append(" (")
.append(NumberFormat.getIntegerInstance().format(episodeAbsoluteNumber.toLong()))
.append(")")
}

// release date
Expand Down Expand Up @@ -624,7 +627,11 @@ class OverviewFragment() : Fragment(), EpisodeActionsContract {
)
}

private fun loadEpisodeImage(imageView: ImageView, detailsHiddenView: View, imagePath: String?) {
private fun loadEpisodeImage(
imageView: ImageView,
detailsHiddenView: View,
imagePath: String?
) {
if (imagePath.isNullOrEmpty()) {
imageView.setImageDrawable(null)
detailsHiddenView.isGone = true
Expand Down

0 comments on commit c27b872

Please sign in to comment.