Skip to content

Commit 0c9f5dd

Browse files
committed
change according to Isira-Seneviratne suggestion
1 parent aa75a14 commit 0c9f5dd

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
461461
}
462462

463463
companion object {
464-
val JSON_MIME_TYPE = getMimeType()
465-
466-
private fun getMimeType(): String {
467-
val mimeTypeJson = MimeTypeMap.getSingleton().getMimeTypeFromExtension("json")
468-
return if (mimeTypeJson.isNullOrBlank())
469-
"application/octet-stream"
470-
else
471-
mimeTypeJson
472-
}
464+
val JSON_MIME_TYPE = MimeTypeMap.getSingleton()
465+
.getMimeTypeFromExtension("json") ?: "application/octet-stream"
473466
}
474467
}

0 commit comments

Comments
 (0)