mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Use a feature flag to hide connect via Bluetooth option
This commit is contained in:
@@ -10,4 +10,6 @@ public interface FeatureFlags {
|
||||
boolean shouldEnableProfilePictures();
|
||||
|
||||
boolean shouldEnableDisappearingMessages();
|
||||
|
||||
boolean shouldEnableConnectViewBluetooth();
|
||||
}
|
||||
|
||||
@@ -38,6 +38,11 @@ public class BrambleCoreIntegrationTestModule {
|
||||
public boolean shouldEnableDisappearingMessages() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldEnableConnectViewBluetooth() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,6 +298,11 @@ public class AppModule {
|
||||
public boolean shouldEnableDisappearingMessages() {
|
||||
return IS_DEBUG_BUILD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldEnableConnectViewBluetooth() {
|
||||
return IS_DEBUG_BUILD;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,6 +371,9 @@ public class ConversationActivity extends BriarActivity
|
||||
this::showIntroductionOnboarding);
|
||||
}
|
||||
});
|
||||
if (!featureFlags.shouldEnableConnectViewBluetooth()) {
|
||||
menu.findItem(R.id.action_connect_via_bluetooth).setVisible(false);
|
||||
}
|
||||
// enable alias and bluetooth action once available
|
||||
observeOnce(viewModel.getContactItem(), this, contact -> {
|
||||
menu.findItem(R.id.action_set_alias).setEnabled(true);
|
||||
|
||||
@@ -94,5 +94,6 @@ internal class HeadlessModule(private val appDir: File) {
|
||||
override fun shouldEnableImageAttachments() = false
|
||||
override fun shouldEnableProfilePictures() = false
|
||||
override fun shouldEnableDisappearingMessages() = false
|
||||
override fun shouldEnableConnectViewBluetooth() = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ internal class HeadlessTestModule(private val appDir: File) {
|
||||
override fun shouldEnableImageAttachments() = false
|
||||
override fun shouldEnableProfilePictures() = false
|
||||
override fun shouldEnableDisappearingMessages() = false
|
||||
override fun shouldEnableConnectViewBluetooth() = false
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
Reference in New Issue
Block a user