summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java2
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java28
2 files changed, 13 insertions, 17 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java b/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java
index fd9aa029..45664653 100644
--- a/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java
+++ b/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java
@@ -3,6 +3,7 @@ package se.leap.bitmaskclient;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.multidex.MultiDexApplication;
+import android.support.v7.app.AppCompatDelegate;
import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;
@@ -36,6 +37,7 @@ public class BitmaskApp extends MultiDexApplication {
providerObservable = ProviderObservable.getInstance();
providerObservable.updateProvider(getSavedProviderFromSharedPreferences(preferences));
EipSetupObserver.init(this, preferences);
+ AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
/**
diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java b/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java
index 001d7e6c..66db9bc8 100644
--- a/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java
@@ -55,23 +55,17 @@ public class DonationReminderDialog extends AppCompatDialogFragment {
isShown = true;
builder.setView(view);
- btnDonate.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(DONATION_URL));
- startActivity(browserIntent);
- PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE,
- DateHelper.getCurrentDateString());
- dismiss();
- }
+ btnDonate.setOnClickListener(v -> {
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(DONATION_URL));
+ startActivity(browserIntent);
+ PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE,
+ DateHelper.getCurrentDateString());
+ dismiss();
});
- btnLater.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE,
- DateHelper.getCurrentDateString());
- dismiss();
- }
+ btnLater.setOnClickListener(v -> {
+ PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE,
+ DateHelper.getCurrentDateString());
+ dismiss();
});
return builder.create();
@@ -90,7 +84,7 @@ public class DonationReminderDialog extends AppCompatDialogFragment {
Log.e(TAG, "context is null!");
return false;
}
-
+
String firstTimeUserDate = PreferenceHelper.getString(context, FIRST_TIME_USER_DATE, null);
if (firstTimeUserDate == null) {
PreferenceHelper.putString(context, FIRST_TIME_USER_DATE, DateHelper.getCurrentDateString());