Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

Commit 60bf1e1

Browse files
committed
[FIXED] Issue about determining youtube URL. Using get() now.
1 parent 872cf48 commit 60bf1e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/main/java/com/hossainkhan/android/demo/data/ResourceInfo.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import java.util.Date
2222

2323

2424
/**
25-
* External resource info.
25+
* External resource info like Youtube video or technical articles online.
2626
*
2727
* Example:
2828
* - author: Nicolas Roard & John Hoford
@@ -52,7 +52,8 @@ data class ResourceInfo(
5252
return FirestoreDateFormatter.date(date)
5353
}
5454

55-
val isYouTubeUrl: Boolean = url.contains("youtube.com/watch?v=", ignoreCase = true)
55+
val isYouTubeUrl: Boolean
56+
get() = url.contains("youtube.com/watch?v=", ignoreCase = true)
5657

5758
/**
5859
* Provides [Uri] for directly invoking youtube app via Android Intent.

0 commit comments

Comments
 (0)