switched the donation platform from buymeacoffee.com to paypal.com
This commit is contained in:
parent
8420c6c961
commit
c2260c1d4e
5 changed files with 8 additions and 3 deletions
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
|
@ -1 +1 @@
|
|||
custom: ['https://www.buymeacoffee.com/sspanak']
|
||||
custom: ['https://www.paypal.com/donate/?hosted_button_id=LW97X3JM2CRZC']
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ clean {
|
|||
}
|
||||
|
||||
// using the exported Closures directly causes weird values, hence the extra wrappers here
|
||||
def getDonationUrl = { -> return new File(FUNDING_FILE).text.replace("custom:", "").replaceAll("['\\s\\[\\]]+", "") }
|
||||
def getVerCode = { -> return getVersionCode() }
|
||||
def getVerName = { -> return getVersionName() }
|
||||
def getVersionString = { flavor -> return flavor == 'debug' ? getDebugVersion() : getReleaseVersion() }
|
||||
|
|
@ -100,11 +101,13 @@ android {
|
|||
|
||||
buildTypes {
|
||||
debug {
|
||||
buildConfigField 'String', 'DONATION_URL', "\"${getDonationUrl()}\""
|
||||
buildConfigField 'String', 'DICTIONARY_EXTENSION', "\"${DICTIONARY_OUTPUT_EXTENSION}\""
|
||||
buildConfigField 'String', 'VERSION_FULL', "\"${getVersionString('debug')}\""
|
||||
}
|
||||
|
||||
release {
|
||||
buildConfigField 'String', 'DONATION_URL', "\"${getDonationUrl()}\""
|
||||
buildConfigField 'String', 'DICTIONARY_EXTENSION', "\"${DICTIONARY_OUTPUT_EXTENSION}\""
|
||||
buildConfigField 'String', 'VERSION_FULL', "\"${getVersionString('release')}\""
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ def APP_ROOT_DIR = "${project.rootDir}/app"
|
|||
def MAIN_ASSETS_DIR = "${APP_ROOT_DIR}/src/main/assets"
|
||||
def FULL_VERSION_ASSETS_DIR = "${APP_ROOT_DIR}/src/full/assets"
|
||||
|
||||
ext.FUNDING_FILE = "${project.rootDir}/.github/FUNDING.yml"
|
||||
|
||||
ext.HELP_MARKDOWN_DIR = "${project.rootDir}/docs/help"
|
||||
ext.HELP_HTML_DIR = "${MAIN_ASSETS_DIR}/help"
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
import io.github.sspanak.tt9.BuildConfig;
|
||||
import io.github.sspanak.tt9.R;
|
||||
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
||||
import io.github.sspanak.tt9.ui.UI;
|
||||
|
|
@ -70,7 +71,7 @@ public class DonatePreference extends Preference {
|
|||
|
||||
private boolean onLongClick(View v) {
|
||||
try {
|
||||
getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getContext().getString(R.string.donate_url))));
|
||||
getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(BuildConfig.DONATION_URL)));
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Logger.w(getClass().getSimpleName(), "Cannot navigate to the donation page. " + e.getMessage() + " (do you have a browser?)");
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@
|
|||
<string name="donate_title">Donate</string>
|
||||
<string name="donate_summary">If you like %1$s, you could buy me a beer.</string>
|
||||
<string name="donate_hold_to_open">Press and hold to open in the browser.</string>
|
||||
<string name="donate_url" translatable="false">https://www.buymeacoffee.com/sspanak</string>
|
||||
|
||||
<string name="function_already_assigned">Key \"%1$s\" is already assigned to function \"%2$s\". Do you want to assign it to \"%3$s\"?</string>
|
||||
<string name="function_assign_instructions">* Press or hold a key to assign it to the \"%1$s\" function.\n\n* Press 0 to cancel.\n\n* Press 2 to disable the function.</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue