Skip to content

Commit

Permalink
Fix dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleangels committed Jan 24, 2025
1 parent a0b8969 commit e056309
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.doubleangels.nextdnsmanagement"
minSdkVersion 32
targetSdk 35
versionCode 240
versionName '5.4.6'
versionCode 241
versionName '5.4.7'
resourceConfigurations += ["en", "zh", "nl", "fi", "fr", "de", "in", "it", "ja", "pl", "pt", "es", "sv", "tr"]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import com.doubleangels.nextdnsmanagement.sentry.SentryInitializer;
import com.doubleangels.nextdnsmanagement.sentry.SentryManager;
import com.doubleangels.nextdnsmanagement.sharedpreferences.SharedPreferencesManager;
import com.jakewharton.processphoenix.ProcessPhoenix;

import java.util.Locale;

Expand Down Expand Up @@ -72,27 +71,25 @@ protected void onCreate(Bundle savedInstanceState) {
darkModeEnabled = savedInstanceState.getBoolean("darkModeEnabled");
}
setContentView(R.layout.activity_main);
if (!ProcessPhoenix.isPhoenixProcess(this)) {
SentryManager sentryManager = new SentryManager(this);
SharedPreferencesManager.init(this);
try {
if (ContextCompat.checkSelfPermission(this, POST_NOTIFICATIONS) == PackageManager.PERMISSION_DENIED) {
ActivityCompat.requestPermissions(this, new String[]{POST_NOTIFICATIONS}, 1);
}
if (sentryManager.isEnabled()) {
sentryManager.captureMessage("Sentry is enabled for NextDNS Manager.");
SentryInitializer.initialize(this);
}
setupStatusBarForActivity();
setupToolbarForActivity();
String appLocale = setupLanguageForActivity();
sentryManager.captureMessage("Using locale: " + appLocale);
setupDarkModeForActivity(sentryManager, SharedPreferencesManager.getString("dark_mode", "match"));
setupVisualIndicatorForActivity(sentryManager, this);
setupWebViewForActivity(getString(R.string.main_url));
} catch (Exception e) {
sentryManager.captureException(e);
SentryManager sentryManager = new SentryManager(this);
SharedPreferencesManager.init(this);
try {
if (ContextCompat.checkSelfPermission(this, POST_NOTIFICATIONS) == PackageManager.PERMISSION_DENIED) {
ActivityCompat.requestPermissions(this, new String[]{POST_NOTIFICATIONS}, 1);
}
if (sentryManager.isEnabled()) {
sentryManager.captureMessage("Sentry is enabled for NextDNS Manager.");
SentryInitializer.initialize(this);
}
setupStatusBarForActivity();
setupToolbarForActivity();
String appLocale = setupLanguageForActivity();
sentryManager.captureMessage("Using locale: " + appLocale);
setupDarkModeForActivity(sentryManager, SharedPreferencesManager.getString("dark_mode", "match"));
setupVisualIndicatorForActivity(sentryManager, this);
setupWebViewForActivity(getString(R.string.main_url));
} catch (Exception e) {
sentryManager.captureException(e);
}
}

Expand Down

0 comments on commit e056309

Please sign in to comment.