disable local server disco on Quicksy flavor

This commit is contained in:
Daniel Gultsch 2019-11-09 10:20:58 +01:00
parent f6724e405e
commit 8d6fdfbde7
2 changed files with 10 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import eu.siacs.conversations.entities.Bookmark;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Room;
import eu.siacs.conversations.services.ChannelDiscoveryService;
import eu.siacs.conversations.services.QuickConversationsService;
import eu.siacs.conversations.ui.adapter.ChannelSearchResultAdapter;
import eu.siacs.conversations.ui.util.PendingItem;
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) {
if (QuickConversationsService.isQuicksy()) {
return ChannelDiscoveryService.Method.JABBER_NETWORK;
}
final SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(c);
final String m = p.getString("channel_discovery_method", c.getString(R.string.default_channel_discovery));
try {

View File

@ -92,11 +92,16 @@ public class SettingsActivity extends XmppActivity implements
changeOmemoSettingSummary();
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");
if (connectionOptions != null) {
expert.removePreference(connectionOptions);
}
if (groupChats != null && channelDiscoveryMethod != null) {
groupChats.removePreference(channelDiscoveryMethod);
}
}
PreferenceScreen mainPreferenceScreen = (PreferenceScreen) mSettingsFragment.findPreference("main_screen");