diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2018-05-12 11:01:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-12 11:01:13 +0200 |
commit | 04929cee4aedbb64852b81309282c817910de24f (patch) | |
tree | 273ec4fde733708105cf9d12cf2f7fb5269d1574 /app | |
parent | 36ac93e031cfaa335c1f6f0268e888c01eeeb5fd (diff) | |
parent | 5fe060506a189c8f675b77f4df5b5d7d71af8d11 (diff) | |
download | AntennaPod-04929cee4aedbb64852b81309282c817910de24f.zip |
Merge pull request #2684 from amhokies/info-bar-time-left
Display time left in queue info bar
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index 85abdd281..bae77d58b 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -534,14 +534,15 @@ public class QueueFragment extends Fragment { private void refreshInfoBar() { String info = queue.size() + getString(R.string.episodes_suffix); if(queue.size() > 0) { - long duration = 0; + long timeLeft = 0; for(FeedItem item : queue) { if(item.getMedia() != null) { - duration += item.getMedia().getDuration(); + timeLeft += item.getMedia().getDuration() - item.getMedia().getPosition(); } } info += " \u2022 "; - info += Converter.getDurationStringLocalized(getActivity(), duration); + info += getString(R.string.time_left_label); + info += Converter.getDurationStringLocalized(getActivity(), timeLeft); } infoBar.setText(info); } |