Improve notifications for different custom Android OS

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-01-10 10:16:26 +01:00 committed by Alper Öztürk
parent ef2ebb9176
commit a0482e496d
2 changed files with 3 additions and 2 deletions

View file

@ -72,7 +72,7 @@ class DownloadNotificationManager(
setProgress(100, 0, operation.size < 0)
setContentText(
String.format(
context.getString(R.string.downloader_download_in_progress_content), 0,
context.getString(R.string.downloader_download_in_progress), 0,
File(operation.savePath).name
)
)
@ -101,7 +101,7 @@ class DownloadNotificationManager(
setProgress(100, percent, totalToTransfer < 0)
val fileName: String = filePath.substring(filePath.lastIndexOf(FileUtils.PATH_SEPARATOR) + 1)
val text =
String.format(context.getString(R.string.downloader_download_in_progress_content), percent, fileName)
String.format(context.getString(R.string.downloader_download_in_progress), percent, fileName)
val title =
context.getString(R.string.downloader_download_in_progress_ticker)
updateNotificationText(title, text, false)

View file

@ -169,6 +169,7 @@
<string name="uploads_view_group_header" translatable="false">%1$s (%2$d)</string>
<string name="downloader_download_in_progress_ticker">Downloading…</string>
<string name="downloader_download_completed">Downloads are completed</string>
<string name="downloader_download_in_progress">%1$d%% %2$s</string>
<string name="downloader_download_in_progress_content">%1$d%% Downloading %2$s</string>
<string name="downloader_download_succeeded_ticker">Downloaded</string>
<string name="downloader_download_succeeded_content">%1$s downloaded</string>