move some more config variables to match different app modes

This commit is contained in:
Christian Schneppe 2019-11-02 16:38:37 +01:00
parent d69583c3f3
commit b1f1c773f8
No known key found for this signature in database
GPG key ID: F30B8D686B44D87E
3 changed files with 6 additions and 5 deletions

View file

@ -116,8 +116,7 @@ android {
buildConfigField("String", "LOGTAG", '"Pix-Art_Messenger"')
buildConfigField("String", "DOMAIN_LOCK", 'null')
buildConfigField("String", "MAGIC_CREATE_DOMAIN", '"blabber.im"')
buildConfigField("int", "ENCRYPTION_MASK", 'UNENCRYPTED | OPENPGP | OTR | OMEMO')
buildConfigField("boolean", "SHOW_INTRO", 'true')
buildConfigField("String", "UPDATE_URL", '"https://xmpp.pix-art.de/Pix-Art_Messenger/update/"')
resValue "string", "applicationId", applicationId
resValue "string", "app_name", "Pix-Art Messenger"
@ -154,7 +153,7 @@ android {
buildConfigField("String", "DOMAIN_LOCK", '"kurswahl-online.de"')
buildConfigField("String", "MAGIC_CREATE_DOMAIN", '"kurswahl-online.de"')
buildConfigField("String", "LOGTAG", '"Schulchat_Messenger"')
buildConfigField("int", "ENCRYPTION_MASK", 'UNENCRYPTED')
buildConfigField("boolean", "SHOW_INTRO", "false")
versionCode = 1
versionName = '1.0.0'
}

View file

@ -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;

View file

@ -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);