Commit 1fcc83a0 authored by Torsten Grote's avatar Torsten Grote

Merge branch 'feature-flag-message-deletion' into 'master'

Add feature flag for private message deletion

See merge request briar/briar!1165
parents a23e0699 249b85cd
Pipeline #3743 passed with stage
in 9 minutes and 5 seconds
......@@ -8,4 +8,6 @@ public interface FeatureFlags {
boolean shouldEnableImageAttachments();
boolean shouldEnableRemoteContacts();
boolean shouldEnablePrivateMessageDeletion();
}
......@@ -29,6 +29,11 @@ public class BrambleCoreIntegrationTestModule {
public boolean shouldEnableRemoteContacts() {
return true;
}
@Override
public boolean shouldEnablePrivateMessageDeletion() {
return true;
}
};
}
}
......@@ -246,6 +246,11 @@ public class AppModule {
public boolean shouldEnableRemoteContacts() {
return IS_DEBUG_BUILD;
}
@Override
public boolean shouldEnablePrivateMessageDeletion() {
return IS_DEBUG_BUILD;
}
};
}
}
......@@ -356,6 +356,11 @@ public class ConversationActivity extends BriarActivity
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.conversation_actions, menu);
// Hide private message deletion action if feature is not enabled
if (!featureFlags.shouldEnablePrivateMessageDeletion()) {
menu.removeItem(R.id.action_delete_all_messages);
}
// enable introduction action if available
observeOnce(viewModel.showIntroductionAction(), this, enable -> {
if (enable != null && enable) {
......
......@@ -99,5 +99,6 @@ internal class HeadlessModule(private val appDir: File) {
internal fun provideFeatureFlags() = object : FeatureFlags {
override fun shouldEnableImageAttachments() = false
override fun shouldEnableRemoteContacts() = true
override fun shouldEnablePrivateMessageDeletion() = true
}
}
......@@ -66,5 +66,6 @@ internal class HeadlessTestModule(private val appDir: File) {
internal fun provideFeatureFlags() = object : FeatureFlags {
override fun shouldEnableImageAttachments() = false
override fun shouldEnableRemoteContacts() = true
override fun shouldEnablePrivateMessageDeletion() = true
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment