aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-09-11 14:31:05 -0700
committerAllan Wang <me@allanwang.ca>2021-09-11 14:31:05 -0700
commit2f2cfd68e8c3d74ca776a6bfc8013828c4308cc3 (patch)
tree627f6e36ebb5dd26d8f4f4b483b8c6cc371a95e8
parent958a0d90199837ee63f7d91caca07c1d47748722 (diff)
downloadfrost-2f2cfd68e8c3d74ca776a6bfc8013828c4308cc3.tar.gz
frost-2f2cfd68e8c3d74ca776a6bfc8013828c4308cc3.tar.bz2
frost-2f2cfd68e8c3d74ca776a6bfc8013828c4308cc3.zip
Fix build failure
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt4
-rw-r--r--spotless.gradle2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt
index e1a6c814..ef56aa7b 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/parsers/MessageParser.kt
@@ -128,8 +128,8 @@ private class MessageParserImpl : FrostParserBase<FrostMessages>(true) {
)
.mapNotNull(this::parseMessage)
val seeMore = parseLink(doc.getElementById("see_older_threads"))
- val extraLinks = threadList.nextElementSibling().select("a")
- .mapNotNull(this::parseLink)
+ val extraLinks = threadList.nextElementSibling()?.select("a")
+ ?.mapNotNull(this::parseLink) ?: emptyList()
return FrostMessages(threads, seeMore, extraLinks)
}
diff --git a/spotless.gradle b/spotless.gradle
index 16e1ff1a..ea95c38f 100644
--- a/spotless.gradle
+++ b/spotless.gradle
@@ -3,7 +3,7 @@ apply plugin: "com.diffplug.spotless"
spotless {
kotlin {
target "**/*.kt"
- ktlint("0.41.0").userData(["disabled_rules": "no-wildcard-imports"])
+ ktlint().userData(["disabled_rules": "no-wildcard-imports"])
licenseHeaderFile '../spotless.license.kt'
trimTrailingWhitespace()
endWithNewline()