From b1f1c773f8a484bd2820b59d883fcc602ddb2ef8 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 2 Nov 2019 16:38:37 +0100 Subject: move some more config variables to match different app modes --- src/main/java/de/pixart/messenger/Config.java | 3 ++- src/main/java/de/pixart/messenger/ui/util/IntroHelper.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/de') diff --git a/src/main/java/de/pixart/messenger/Config.java b/src/main/java/de/pixart/messenger/Config.java index dbac68194..19af8b31b 100644 --- a/src/main/java/de/pixart/messenger/Config.java +++ b/src/main/java/de/pixart/messenger/Config.java @@ -17,7 +17,7 @@ public final class Config { private static final int OTR = 4; private static final int OMEMO = 8; - private static final int ENCRYPTION_MASK = BuildConfig.ENCRYPTION_MASK; + private static final int ENCRYPTION_MASK = UNENCRYPTED | OPENPGP | OTR | OMEMO; public static boolean supportUnencrypted() { return (ENCRYPTION_MASK & UNENCRYPTED) != 0; @@ -56,6 +56,7 @@ public final class Config { public static final String CHANNEL_DISCOVERY = "https://search.jabber.network"; public static final String DEFAULT_INVIDIOUS_HOST = "invidio.us"; public static final boolean DISALLOW_REGISTRATION_IN_UI = false; //hide the register checkbox + public static final boolean SHOW_INTRO = BuildConfig.SHOW_INTRO; public static final boolean USE_RANDOM_RESOURCE_ON_EVERY_BIND = false; diff --git a/src/main/java/de/pixart/messenger/ui/util/IntroHelper.java b/src/main/java/de/pixart/messenger/ui/util/IntroHelper.java index 817551c4f..f4a593739 100644 --- a/src/main/java/de/pixart/messenger/ui/util/IntroHelper.java +++ b/src/main/java/de/pixart/messenger/ui/util/IntroHelper.java @@ -6,6 +6,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.preference.PreferenceManager; +import de.pixart.messenger.Config; import de.pixart.messenger.ui.IntroActivity; import static de.pixart.messenger.ui.IntroActivity.ACTIVITY; @@ -19,7 +20,7 @@ public class IntroHelper { String INTRO = "intro_shown_on_activity_" + activityname + "_MultiMode_" + mode_multi; boolean SHOW_INTRO = getPrefs.getBoolean(INTRO, true); - if (SHOW_INTRO) { + if (SHOW_INTRO && Config.SHOW_INTRO) { final Intent i = new Intent(activity, IntroActivity.class); i.putExtra(ACTIVITY, activityname); i.putExtra(MULTICHAT, mode_multi); -- cgit v1.2.3