Verified Commit 5147f6b7 authored by Torsten Grote's avatar Torsten Grote
Browse files

Remove RemoteContacts feature flag in preparation of 1.2 release

parent 84a8ff1d
Pipeline #3851 passed with stage
in 10 minutes and 9 seconds
......@@ -7,7 +7,5 @@ public interface FeatureFlags {
boolean shouldEnableImageAttachments();
boolean shouldEnableRemoteContacts();
boolean shouldEnablePrivateMessageDeletion();
}
......@@ -25,11 +25,6 @@ public class BrambleCoreIntegrationTestModule {
return true;
}
@Override
public boolean shouldEnableRemoteContacts() {
return true;
}
@Override
public boolean shouldEnablePrivateMessageDeletion() {
return true;
......
......@@ -242,11 +242,6 @@ public class AppModule {
return IS_DEBUG_BUILD;
}
@Override
public boolean shouldEnableRemoteContacts() {
return IS_DEBUG_BUILD;
}
@Override
public boolean shouldEnablePrivateMessageDeletion() {
return IS_DEBUG_BUILD;
......
......@@ -14,7 +14,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.briarproject.bramble.api.FeatureFlags;
import org.briarproject.bramble.api.contact.Contact;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.bramble.api.contact.ContactManager;
......@@ -57,7 +56,6 @@ import javax.inject.Inject;
import io.github.kobakei.materialfabspeeddial.FabSpeedDial;
import io.github.kobakei.materialfabspeeddial.FabSpeedDial.OnMenuItemClickListener;
import io.github.kobakei.materialfabspeeddial.FabSpeedDialMenu;
import static android.os.Build.VERSION.SDK_INT;
import static android.support.design.widget.Snackbar.LENGTH_INDEFINITE;
......@@ -85,8 +83,6 @@ public class ContactListFragment extends BaseFragment implements EventListener,
EventBus eventBus;
@Inject
AndroidNotificationManager notificationManager;
@Inject
FeatureFlags featureFlags;
private ContactListAdapter adapter;
private BriarRecyclerView list;
......@@ -126,19 +122,7 @@ public class ContactListFragment extends BaseFragment implements EventListener,
container, false);
FabSpeedDial speedDial = contentView.findViewById(R.id.speedDial);
if (featureFlags.shouldEnableRemoteContacts()) {
speedDial.addOnMenuItemClickListener(this);
} else {
speedDial.setMenu(new FabSpeedDialMenu(contentView.getContext()));
speedDial.addOnStateChangeListener(open -> {
if (open) {
Intent intent = new Intent(getContext(),
ContactExchangeActivity.class);
startActivity(intent);
speedDial.closeMenu();
}
});
}
speedDial.addOnMenuItemClickListener(this);
OnContactClickListener<ContactListItem> onContactClickListener =
(view, item) -> {
......@@ -169,9 +153,10 @@ public class ContactListFragment extends BaseFragment implements EventListener,
startActivity(i);
}
};
adapter = new ContactListAdapter(getContext(), onContactClickListener);
adapter = new ContactListAdapter(requireContext(),
onContactClickListener);
list = contentView.findViewById(R.id.list);
list.setLayoutManager(new LinearLayoutManager(getContext()));
list.setLayoutManager(new LinearLayoutManager(requireContext()));
list.setAdapter(adapter);
list.setEmptyImage(R.drawable.ic_empty_state_contact_list);
list.setEmptyText(getString(R.string.no_contacts));
......
......@@ -98,7 +98,6 @@ internal class HeadlessModule(private val appDir: File) {
@Provides
internal fun provideFeatureFlags() = object : FeatureFlags {
override fun shouldEnableImageAttachments() = false
override fun shouldEnableRemoteContacts() = true
override fun shouldEnablePrivateMessageDeletion() = true
}
}
......@@ -65,7 +65,6 @@ internal class HeadlessTestModule(private val appDir: File) {
@Provides
internal fun provideFeatureFlags() = object : FeatureFlags {
override fun shouldEnableImageAttachments() = false
override fun shouldEnableRemoteContacts() = true
override fun shouldEnablePrivateMessageDeletion() = true
}
}
Supports Markdown
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