Add in-app sponsor support
This commit is contained in:
@@ -103,6 +103,11 @@ class SettingsFragment : Fragment() {
|
||||
binding.openDebugButton.setOnClickListener {
|
||||
startActivity(Intent(requireContext(), DebugActivity::class.java))
|
||||
}
|
||||
binding.startSponserButton.setOnClickListener {
|
||||
Vendor.startSponsor(requireActivity()) {
|
||||
activity.launchCustomTab("https://sekai.icu/sponsor/")
|
||||
}
|
||||
}
|
||||
lifecycleScope.launch(Dispatchers.IO) {
|
||||
reloadSettings()
|
||||
}
|
||||
|
||||
@@ -5,5 +5,5 @@ import android.app.Activity
|
||||
interface VendorInterface {
|
||||
fun checkUpdateAvailable(): Boolean
|
||||
fun checkUpdate(activity: Activity, byUser: Boolean)
|
||||
|
||||
fun startSponsor(activity: Activity, fallback: () -> Unit)
|
||||
}
|
||||
Reference in New Issue
Block a user