Fix compiler warning

This commit is contained in:
tzugen 2021-08-26 20:07:32 +02:00
parent 0a2e7358fa
commit d83cf0917c
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
1 changed files with 6 additions and 1 deletions

View File

@ -15,7 +15,12 @@ data class Share(
private val entries: MutableList<Entry> = mutableListOf()
) : Serializable, GenericEntry() {
override val name: String?
get() = url?.let { urlPattern.matcher(url).replaceFirst("$1") }
get() {
if (url != null) {
return urlPattern.matcher(url!!).replaceFirst("$1")
}
return null
}
fun getEntries(): List<Entry> {
return entries.toList()