Removing unnecessary logs

pull/3/head
Vitor Pamplona 2023-01-12 22:35:51 -05:00
rodzic bf827fd1f4
commit a336118d0d
2 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

@ -52,7 +52,7 @@ class NewPostViewModel: ViewModel() {
return message.split('\n').firstNotNullOfOrNull { paragraph ->
paragraph.split(' ').firstOrNull { word: String ->
isValidURL(word) || noProtocolUrlValidator.matcher(word).matches()
}.apply { println("(${this})") }
}
}
}
}

Wyświetl plik

@ -41,10 +41,8 @@ fun UrlPreview(url: String, urlText: String, showUrlIfError: Boolean = true) {
// Doesn't use a viewModel because of viewModel reusing issues (too many UrlPreview are created).
LaunchedEffect(url) {
println("url preview ${url}")
BahaUrlPreview(url, object : IUrlPreviewCallback {
override fun onComplete(urlInfo: UrlInfoItem) {
println("completed ${urlInfo.title}")
if (urlInfo.allFetchComplete() && urlInfo.url == url)
urlPreviewState = UrlPreviewState.Loaded(urlInfo)
else
@ -52,7 +50,6 @@ fun UrlPreview(url: String, urlText: String, showUrlIfError: Boolean = true) {
}
override fun onFailed(throwable: Throwable) {
println("failed")
urlPreviewState = UrlPreviewState.Error("Error parsing preview for ${url}: ${throwable.message}")
}
}).fetchUrlPreview()