Address misc. build warnings

This commit is contained in:
arkon
2022-08-10 23:26:34 -04:00
parent 24e64f52e2
commit d6f1534ee8
29 changed files with 96 additions and 37 deletions
@@ -49,7 +49,7 @@ class DownloadPendingDeleter(context: Context) {
// Last entry matches the manga, reuse it to avoid decoding json from preferences
lastEntry.copy(chapters = newChapters)
} else {
val existingEntry = preferences.getString(manga.id!!.toString(), null)
val existingEntry = preferences.getString(manga.id.toString(), null)
if (existingEntry != null) {
// Existing entry found on preferences, decode json and add the new chapter
val savedEntry = json.decodeFromString<Entry>(existingEntry)
@@ -114,7 +114,7 @@ class DownloadStore(
* @param download the download to serialize.
*/
private fun serialize(download: Download): String {
val obj = DownloadObject(download.manga.id!!, download.chapter.id!!, counter++)
val obj = DownloadObject(download.manga.id, download.chapter.id!!, counter++)
return json.encodeToString(obj)
}