Show download percentage also in the title

This commit is contained in:
tzugen 2021-04-17 11:58:42 +02:00
parent 4787924fcc
commit 467df602ec
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
1 changed files with 1 additions and 2 deletions

View File

@ -1375,8 +1375,7 @@ public class PlayerFragment extends Fragment implements GestureDetector.OnGestur
switch (playerState) switch (playerState)
{ {
case DOWNLOADING: case DOWNLOADING:
final long bytes = currentPlaying != null ? currentPlaying.getPartialFile().length() : 0; String downloadStatus = getResources().getString(R.string.download_playerstate_downloading, Util.formatPercentage(currentPlaying.getProgress().getValue()));
String downloadStatus = getResources().getString(R.string.download_playerstate_downloading, Util.formatLocalizedBytes(bytes, getContext()));
FragmentTitle.Companion.setTitle(PlayerFragment.this, downloadStatus); FragmentTitle.Companion.setTitle(PlayerFragment.this, downloadStatus);
break; break;
case PREPARING: case PREPARING: