droid-feed
droid-feed copied to clipboard
Can't Add rss url
`fun onSaveSourceClicked(url: String) = viewModelScope.launch(Dispatchers.IO) { val trimmedUrl = url.trimIndent() if (Patterns.WEB_URL.matcher(trimmedUrl.toLowerCase(Locale.US)).matches()) { sourceErrText.postValue(R.string.empty_string)
val cleanUrl = URLUtil.guessUrl(trimmedUrl)
val alreadyExists = sourceRepo.isSourceExisting(cleanUrl)
if (alreadyExists) {
sourceErrText.postValue(R.string.error_source_exists)
} else {
isSourceProgressVisible.postValue(true)
isSourceAddButtonEnabled.postValue(false)
closeKeyboardEvent.postEvent(true)
addSource(cleanUrl)
}
} else if (url.isEmpty()) {
sourceErrText.postValue(R.string.error_empty_source_url)
} else {
sourceErrText.postValue(R.string.error_invalid_url)
}
}`
I want to add rss ,but it appears to not work.