updating commons, kotlin + add some keyboard hiding

This commit is contained in:
tibbi 2022-02-05 21:07:43 +01:00
parent 54e02171f5
commit 8336ec0052
8 changed files with 13 additions and 17 deletions

View file

@ -938,18 +938,3 @@ fun Context.getFileSizeFromUri(uri: Uri): Long {
return FILE_SIZE_NONE
}
}
fun Context.dialNumber(phoneNumber: String, callback: (() -> Unit)? = null) {
Intent(Intent.ACTION_DIAL).apply {
data = Uri.fromParts("tel", phoneNumber, null)
try {
startActivity(this)
callback?.invoke()
} catch (e: ActivityNotFoundException) {
toast(R.string.no_app_found)
} catch (e: Exception) {
showErrorToast(e)
}
}
}