Skip to content

Commit

Permalink
Add Donation
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanklee committed May 18, 2024
1 parent e3a999d commit fde4f4e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
custom: ["https://paypal.me/jnthnkl"]
custom: ["https://www.paypal.com/donate/?hosted_button_id=RE3PM6W85N5HW"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ curl -X GET "https://sapio.ovh/api/upload/files?filters\[name\]\[\$eq\]=com.open
# ☕ Coffee
If you want to offer me a coffee for the maintenance of the server part: https://paypal.me/jnthnkl
If you want to offer me a coffee for the maintenance of the server part: [Donate](https://www.paypal.com/donate/?hosted_button_id=RE3PM6W85N5HW)
# 👏 Credits
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/com/klee/sapio/ui/view/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.klee.sapio.ui.view

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.Menu
import android.view.MenuInflater
Expand All @@ -16,6 +17,10 @@ class MainActivity : AppCompatActivity() {

private lateinit var mBinding: ActivityMainBinding

companion object {
const val DONATE_URL = "https://www.paypal.com/donate/?hosted_button_id=RE3PM6W85N5HW"
}

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

Expand Down Expand Up @@ -51,6 +56,10 @@ class MainActivity : AppCompatActivity() {
startActivity(intent)
return true
}
R.id.donate -> {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(DONATE_URL)))
return true
}
else -> super.onOptionsItemSelected(item)
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/menu/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/about"
android:title="@string/about" />
<item android:id="@+id/donate"
android:title="@string/donate" />
</menu>
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<string name="search_title">Rechercher</string>
<string name="contribute_title">Contribuer</string>
<string name="about">A propos</string>
<string name="donate">Faire un don</string>
<string name="the_device_has_microg_installed">L\'appareil a microG d\'installé</string>
<string name="the_device_is_a_bare_aosp_device">L\'appareil est un AOSP pure</string>
<string name="the_device_is_not_rooted">L\'appareil n\'est pas rooté</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@
<string name="bad">Does not work at all</string>
<string name="unknown">Unknown</string>
<string name="share">Share</string>
<string name="donate">Donate</string>
</resources>

0 comments on commit fde4f4e

Please sign in to comment.