INNER CODE UNIT · Kotlin
giveDonation
Shabinder/SpotiFlyer · desktop/src/jvmMain/kotlin/Main.kt:158
override fun giveDonation() {
openLink("https://razorpay.com/payment-button/pl_GnKuuDBdBu0ank/view/?utm_source=payment_button&utm_medium=button&utm_campaign=payment_button")
}
override fun shareApp() = openLink("https://github.com/Shabinder/SpotiFlyer")
override fun copyToClipboard(text: String) {
val data = StringSelection(text)
val cb: Clipboard = Toolkit.getDefaultToolkit().systemClipboard
cb.setContents(data, data)
}
override fun openPlatform(packageID: String, platformLink: String) = openLink(platformLink)
fun openLink(link: String) {
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
Desktop.getDesktop().browse(URI(link))
}
}