only http for the url previews
This commit is contained in:
@@ -79,7 +79,7 @@ object CachedUrlParser {
|
||||
cached
|
||||
} else {
|
||||
val urlSet = UrlParser().parseValidUrls(content)
|
||||
val newUrls = urlSet.withScheme.toList() + urlSet.withoutScheme.map { "http://$it" }
|
||||
val newUrls = urlSet.withScheme.filter { it.startsWith("http") } + urlSet.withoutScheme.map { "http://$it" }
|
||||
parsedUrlsCache.put(key, newUrls)
|
||||
newUrls
|
||||
}
|
||||
|
||||
+3
-2
@@ -39,8 +39,9 @@ class PreviewState {
|
||||
val results =
|
||||
source
|
||||
.debounce(500)
|
||||
.map { CachedUrlParser.parseValidUrls(it.text) }
|
||||
.distinctUntilChanged()
|
||||
.map {
|
||||
CachedUrlParser.parseValidUrls(it.text)
|
||||
}.distinctUntilChanged()
|
||||
.flowOn(Dispatchers.IO)
|
||||
|
||||
fun reset() {
|
||||
|
||||
Reference in New Issue
Block a user