Minor changes and fixes

This commit is contained in:
len
2016-12-03 13:08:26 +01:00
parent d10bf45283
commit f514d466a6
5 changed files with 11 additions and 8 deletions

View File

@@ -319,7 +319,7 @@ class LibraryUpdateService : Service() {
* @return the body of the notification to display.
*/
private fun getUpdatedMangasBody(updates: List<Manga>, failedUpdates: List<Manga>): String {
return with(StringBuilder()) {
return buildString {
if (updates.isEmpty()) {
append(getString(R.string.notification_no_new_chapters))
append("\n")
@@ -327,7 +327,7 @@ class LibraryUpdateService : Service() {
append(getString(R.string.notification_new_chapters))
for (manga in updates) {
append("\n")
append(manga.title.chop(30))
append(manga.title.chop(45))
}
}
if (!failedUpdates.isEmpty()) {
@@ -335,10 +335,9 @@ class LibraryUpdateService : Service() {
append(getString(R.string.notification_manga_update_failed))
for (manga in failedUpdates) {
append("\n")
append(manga.title.chop(30))
append(manga.title.chop(45))
}
}
toString()
}
}