mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-10 12:59:51 +02:00
Removing unnecessary logs
This commit is contained in:
parent
bf827fd1f4
commit
a336118d0d
@ -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})") }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user