simplify the uri sharing

This commit is contained in:
tibbi 2017-11-19 18:44:29 +01:00
parent 18104b98c0
commit 2ef400d342

View file

@ -15,12 +15,8 @@ fun Activity.shareUri(uri: Uri) {
} }
fun Activity.shareUris(uris: ArrayList<Uri>) { fun Activity.shareUris(uris: ArrayList<Uri>) {
if (uris.size == 1) {
shareUri(uris.first())
} else {
shareUris(uris, BuildConfig.APPLICATION_ID) shareUris(uris, BuildConfig.APPLICATION_ID)
} }
}
fun Activity.openFile(uri: Uri, forceChooser: Boolean) { fun Activity.openFile(uri: Uri, forceChooser: Boolean) {
openFile(uri, forceChooser, BuildConfig.APPLICATION_ID) openFile(uri, forceChooser, BuildConfig.APPLICATION_ID)