fix some blabber.im urls

This commit is contained in:
Christian Schneppe 2020-11-07 08:31:59 +01:00
parent 5f289c24a0
commit 5f5b12545a
3 changed files with 22 additions and 7 deletions

View file

@ -5,6 +5,7 @@ import android.net.Uri;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import eu.siacs.conversations.xmpp.chatstate.ChatState;
import eu.siacs.conversations.xmpp.Jid;
@ -40,15 +41,28 @@ public final class Config {
return (ENCRYPTION_MASK & (ENCRYPTION_MASK - 1)) != 0;
}
public static String blabber() {
if (Locale.getDefault().getLanguage().equalsIgnoreCase("de")) {
return "blabber.im";
} else {
return "blabber.im/en";
}
}
public static final String LOGTAG = BuildConfig.LOGTAG;
public static final Jid BUG_REPORTS = Jid.of("bugs@blabber.im");
public static final Uri HELP = Uri.parse("https://help.conversations.im");
public static final String inviteUserURL = "https://blabber.im/i/";
public static final String inviteMUCURL = "https://blabber.im/j/";
public static final String inviteHostURL = "blabber.im"; // without http(s)
public static final String CHANGELOG_URL = "https://github.com/kriztan/Pix-Art-Messenger/blob/master/CHANGELOG.md";
public static final String inviteUserURL = "https://" + blabber() + "/i/";
public static final String inviteMUCURL = "https://" + blabber() + "/j/";
public static final String inviteHostURL = blabber(); // without http(s)
public static final String termsOfUseURL = "https://" + blabber() + "/nutzungsbedingungen/";
public static final String privacyURL = "https://" + blabber() + "/datenschutz/";
public static final String migrationURL = "https://" + blabber() + "/quick-start/migration-pixart-blabber/";
public static final String CHANGELOG_URL = "https://codeberg.org/kriztan/blabber.im/src/branch/master/CHANGELOG.md";
public static final String GIT_URL = "https://codeberg.org/kriztan/blabber.im/";
public static final String XMPP_IP = null; //BuildConfig.XMPP_IP; // set to null means disable
public static final Integer[] XMPP_Ports = null; //BuildConfig.XMPP_Ports; // set to null means disable

View file

@ -9,6 +9,7 @@ import android.widget.Toast;
import java.util.Calendar;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
import eu.siacs.conversations.utils.ThemeHelper;
import me.drakeet.support.toast.ToastCompat;
@ -44,7 +45,7 @@ public class AboutActivity extends XmppActivity {
privacyButton = findViewById(R.id.show_privacy_policy);
privacyButton.setOnClickListener(view -> {
try {
final Uri uri = Uri.parse("https://blabber.im/en/datenschutz/");
final Uri uri = Uri.parse(Config.privacyURL);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(browserIntent);
} catch (Exception e) {
@ -54,7 +55,7 @@ public class AboutActivity extends XmppActivity {
termsOfUseButton = findViewById(R.id.show_terms_of_use);
termsOfUseButton.setOnClickListener(view -> {
try {
final Uri uri = Uri.parse("https://blabber.im/en/nutzungsbedingungen/");
final Uri uri = Uri.parse(Config.termsOfUseURL);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(browserIntent);
} catch (Exception e) {

View file

@ -14,7 +14,7 @@
\n\nYou should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses
\n\nDownload the full original source code at https://github.com/siacs/Conversations (Copyright © Daniel Gultsch)
\n\nDownload the modified source code at https://github.com/kriztan/Pix-Art-Messenger
\n\nDownload the modified source code at https://codeberg.org/kriztan/blabber.im
\n\nYou can support Christian Schneppe by making a donation in form of a gift in sense of § 516 ff BGB i.e. a gratuitous donation via PayPal for pix-art@pix-art.de
\n\nYou can support the blabber.im provider by making a donation. More information on https://blabber.im/en/unterstuetzen
</string>