aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2019-10-02 15:30:26 +0200
committerChristian Schneppe <christian.schneppe@pix-art.de>2019-10-02 15:30:26 +0200
commitcb0be6f06ac8d542c38d6b55babe23e1a207de9f (patch)
treee40dbbc6f0720445b63fbb99b4ef6764eff55204 /src/main/java/de/pixart
parentae45a3e55b294ab31c7ae1f522a35956f8125349 (diff)
do not set invideous as default and add config to first start settings screen
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java
index 1b04924d9..764ec0ce7 100644
--- a/src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/SetSettingsActivity.java
@@ -24,6 +24,7 @@ import static de.pixart.messenger.ui.SettingsActivity.CONFIRM_MESSAGES;
import static de.pixart.messenger.ui.SettingsActivity.FORBID_SCREENSHOTS;
import static de.pixart.messenger.ui.SettingsActivity.SHOW_LINKS_INSIDE;
import static de.pixart.messenger.ui.SettingsActivity.SHOW_MAPS_INSIDE;
+import static de.pixart.messenger.ui.SettingsActivity.USE_INVIDIOUS;
public class SetSettingsActivity extends XmppActivity implements XmppConnectionService.OnAccountUpdate {
ActivitySetSettingsBinding binding;
@@ -34,6 +35,7 @@ public class SetSettingsActivity extends XmppActivity implements XmppConnectionS
static final int CHATSTATES = 4;
static final int CONFIRMMESSAGES = 5;
static final int LASTSEEN = 6;
+ static final int INVIDEOUS = 7;
@Override
protected void refreshUiReal() {
@@ -63,6 +65,7 @@ public class SetSettingsActivity extends XmppActivity implements XmppConnectionS
this.binding.actionInfoChatStates.setOnClickListener(string -> showInfo(CHATSTATES));
this.binding.actionInfoConfirmMessages.setOnClickListener(string -> showInfo(CONFIRMMESSAGES));
this.binding.actionInfoLastSeen.setOnClickListener(string -> showInfo(LASTSEEN));
+ this.binding.actionInfoInvideous.setOnClickListener(string -> showInfo(INVIDEOUS));
}
private void getDefaults() {
@@ -72,6 +75,7 @@ public class SetSettingsActivity extends XmppActivity implements XmppConnectionS
this.binding.chatStates.setChecked(getResources().getBoolean(R.bool.chat_states));
this.binding.confirmMessages.setChecked(getResources().getBoolean(R.bool.confirm_messages));
this.binding.lastSeen.setChecked(getResources().getBoolean(R.bool.last_activity));
+ this.binding.invideous.setChecked(getResources().getBoolean(R.bool.use_invidious));
}
private void next(View view) {
@@ -117,6 +121,10 @@ public class SetSettingsActivity extends XmppActivity implements XmppConnectionS
title = getString(R.string.pref_broadcast_last_activity);
message = getString(R.string.pref_broadcast_last_activity_summary);
break;
+ case INVIDEOUS:
+ title = getString(R.string.pref_use_invidious);
+ message = getString(R.string.pref_use_invidious_summary);
+ break;
default:
title = getString(R.string.error);
message = getString(R.string.error);
@@ -162,6 +170,11 @@ public class SetSettingsActivity extends XmppActivity implements XmppConnectionS
} else {
preferences.edit().putBoolean(BROADCAST_LAST_ACTIVITY, false).apply();
}
+ if (this.binding.invideous.isChecked()) {
+ preferences.edit().putBoolean(USE_INVIDIOUS, true).apply();
+ } else {
+ preferences.edit().putBoolean(USE_INVIDIOUS, false).apply();
+ }
}
@Override