disable local server disco on Quicksy flavor
This commit is contained in:
parent
f6724e405e
commit
8d6fdfbde7
|
@ -31,6 +31,7 @@ import eu.siacs.conversations.entities.Bookmark;
|
||||||
import eu.siacs.conversations.entities.Conversation;
|
import eu.siacs.conversations.entities.Conversation;
|
||||||
import eu.siacs.conversations.entities.Room;
|
import eu.siacs.conversations.entities.Room;
|
||||||
import eu.siacs.conversations.services.ChannelDiscoveryService;
|
import eu.siacs.conversations.services.ChannelDiscoveryService;
|
||||||
|
import eu.siacs.conversations.services.QuickConversationsService;
|
||||||
import eu.siacs.conversations.ui.adapter.ChannelSearchResultAdapter;
|
import eu.siacs.conversations.ui.adapter.ChannelSearchResultAdapter;
|
||||||
import eu.siacs.conversations.ui.util.PendingItem;
|
import eu.siacs.conversations.ui.util.PendingItem;
|
||||||
import eu.siacs.conversations.ui.util.SoftKeyboardUtils;
|
import eu.siacs.conversations.ui.util.SoftKeyboardUtils;
|
||||||
|
@ -88,6 +89,9 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ChannelDiscoveryService.Method getMethod(final Context c) {
|
private static ChannelDiscoveryService.Method getMethod(final Context c) {
|
||||||
|
if (QuickConversationsService.isQuicksy()) {
|
||||||
|
return ChannelDiscoveryService.Method.JABBER_NETWORK;
|
||||||
|
}
|
||||||
final SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(c);
|
final SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(c);
|
||||||
final String m = p.getString("channel_discovery_method", c.getString(R.string.default_channel_discovery));
|
final String m = p.getString("channel_discovery_method", c.getString(R.string.default_channel_discovery));
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -92,11 +92,16 @@ public class SettingsActivity extends XmppActivity implements
|
||||||
changeOmemoSettingSummary();
|
changeOmemoSettingSummary();
|
||||||
|
|
||||||
if (QuickConversationsService.isQuicksy()) {
|
if (QuickConversationsService.isQuicksy()) {
|
||||||
PreferenceCategory connectionOptions = (PreferenceCategory) mSettingsFragment.findPreference("connection_options");
|
final PreferenceCategory connectionOptions = (PreferenceCategory) mSettingsFragment.findPreference("connection_options");
|
||||||
|
final PreferenceCategory groupChats = (PreferenceCategory) mSettingsFragment.findPreference("group_chats");
|
||||||
|
final Preference channelDiscoveryMethod = mSettingsFragment.findPreference("channel_discovery_method");
|
||||||
PreferenceScreen expert = (PreferenceScreen) mSettingsFragment.findPreference("expert");
|
PreferenceScreen expert = (PreferenceScreen) mSettingsFragment.findPreference("expert");
|
||||||
if (connectionOptions != null) {
|
if (connectionOptions != null) {
|
||||||
expert.removePreference(connectionOptions);
|
expert.removePreference(connectionOptions);
|
||||||
}
|
}
|
||||||
|
if (groupChats != null && channelDiscoveryMethod != null) {
|
||||||
|
groupChats.removePreference(channelDiscoveryMethod);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PreferenceScreen mainPreferenceScreen = (PreferenceScreen) mSettingsFragment.findPreference("main_screen");
|
PreferenceScreen mainPreferenceScreen = (PreferenceScreen) mSettingsFragment.findPreference("main_screen");
|
||||||
|
|
Loading…
Reference in a new issue