From Idiotic Bat, 2 Weeks ago, written in Plain Text.
This paste will perish in 1 Second.
Embed
  1. diff --git a/build.gradle b/build.gradle
  2. index ae5499dc4..0478daa3d 100644
  3. --- a/build.gradle
  4. +++ b/build.gradle
  5. @@ -112,6 +112,7 @@ android {
  6.          buildConfigField 'String', 'INVITE_HOST', '"jabber.thedevstack.de"'
  7.          buildConfigField 'String', 'TERMS_OF_USE_URL', '"https://piratx.thedevstack.de/termsofuse.html"'
  8.          buildConfigField 'String', 'PRIVACY_URL', '"https://piratx.thedevstack.de/privacy.html"'
  9. +        buildConfigField 'String', 'fixedDomain', 'null'
  10.      }
  11.  
  12.      dataBinding {
  13. @@ -130,7 +131,7 @@ android {
  14.          targetCompatibility JavaVersion.VERSION_1_8
  15.      }
  16.  
  17. -    flavorDimensions("distribution", "stage")
  18. +    flavorDimensions("product", "brand", "stage")
  19.  
  20.      productFlavors {
  21.          beta {
  22. @@ -140,13 +141,18 @@ android {
  23.              resValue "string", "applicationId", appId + applicationIdSuffix
  24.          }
  25.          piratx {
  26. -            dimension "distribution"
  27. +            dimension "product"
  28.          }
  29. -        standardPush {
  30. -            dimension "distribution"
  31. +        normal {
  32. +            dimension "brand"
  33. +        }
  34. +        zur {
  35. +            dimension "brand"
  36. +            buildConfigField 'String', 'fixedDomain', '"jabber.mail-zur.de"'
  37. +            applicationIdSuffix '.zur'
  38.          }
  39.          standard {
  40. -            dimension "distribution"
  41. +            dimension "product"
  42.          }
  43.      }
  44.      if (project.hasProperty('mStoreFile') &&
  45. diff --git a/src/main/java/de/pixart/messenger/Config.java b/src/main/java/de/pixart/messenger/Config.java
  46. index a9fef89c7..c1be73a84 100644
  47. --- a/src/main/java/de/pixart/messenger/Config.java
  48. +++ b/src/main/java/de/pixart/messenger/Config.java
  49. @@ -53,8 +53,8 @@ public final class Config {
  50.  
  51.      public static final String XMPP_IP = null; //BuildConfig.XMPP_IP; // set to null means disable
  52.      public static final Integer[] XMPP_Ports = null; //BuildConfig.XMPP_Ports; // set to null means disable
  53. -    public static final String DOMAIN_LOCK = null; //BuildConfig.DOMAIN_LOCK; //only allow account creation for this domain
  54. -    public static final String MAGIC_CREATE_DOMAIN = null; //"blabber.im";
  55. +    public static final String DOMAIN_LOCK = BuildConfig.fixedDomain; //BuildConfig.DOMAIN_LOCK; //only allow account creation for this domain
  56. +    public static final String MAGIC_CREATE_DOMAIN = BuildConfig.fixedDomain; //"blabber.im";
  57.      public static final String CHANNEL_DISCOVERY = "https://search.jabbercat.org";
  58.      public static final boolean DISALLOW_REGISTRATION_IN_UI = false; //hide the register checkbox
  59.  
  60. diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
  61. index 7e204b665..03a150524 100644
  62. --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
  63. +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
  64. @@ -171,7 +171,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
  65.      }
  66.  
  67.      private int getItemViewType(Message message) {
  68. -        if (BuildConfig.FLAVOR_distribution.equalsIgnoreCase("piratx") && message.hasMeCommand()) {
  69. +        if (BuildConfig.FLAVOR_product.equalsIgnoreCase("piratx") && message.hasMeCommand()) {
  70.              return VIEWTYPE_ME_COMMAND;
  71.          }
  72.          if (message.getType() == Message.TYPE_STATUS) {