String Formatting Fixes (#3118)

String Formatting Fixes
This commit is contained in:
MCAxiaz 2020-05-08 18:44:01 -07:00 committed by GitHub
parent 40776bdc8d
commit a20874f6a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -94,8 +94,9 @@ internal class DownloadNotifier(private val context: Context) {
) )
} }
val downloadingProgressText = context.getString(R.string.chapter_downloading_progress) val downloadingProgressText = context.getString(
.format(download.downloadedImages, download.pages!!.size) R.string.chapter_downloading_progress, download.downloadedImages, download.pages!!.size
)
if (preferences.hideNotificationContent()) { if (preferences.hideNotificationContent()) {
setContentTitle(downloadingProgressText) setContentTitle(downloadingProgressText)

View File

@ -58,8 +58,9 @@ class HistoryHolder(
// Set chapter number + timestamp // Set chapter number + timestamp
val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble()) val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble())
manga_subtitle.text = itemView.context.getString(R.string.recent_manga_time) manga_subtitle.text = itemView.context.getString(
.format(formattedNumber, Date(history.last_read).toTimestampString()) R.string.recent_manga_time, formattedNumber, Date(history.last_read).toTimestampString()
)
// Set cover // Set cover
GlideApp.with(itemView.context).clear(cover) GlideApp.with(itemView.context).clear(cover)

View File

@ -19,7 +19,7 @@ class TrackLogoutDialog(bundle: Bundle? = null) : DialogController(bundle) {
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.title(R.string.logout_title, service.name) .title(text = activity!!.getString(R.string.logout_title, service.name))
.positiveButton(R.string.logout) { .positiveButton(R.string.logout) {
service.logout() service.logout()
(targetController as? Listener)?.trackLogoutDialogClosed(service) (targetController as? Listener)?.trackLogoutDialogClosed(service)