mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Add a controller for contact selection lists
This commit is contained in:
@@ -5,22 +5,13 @@ import android.os.Bundle;
|
||||
|
||||
import org.briarproject.R;
|
||||
import org.briarproject.android.ActivityComponent;
|
||||
import org.briarproject.android.contactselection.ContactSelectorFragment;
|
||||
import org.briarproject.android.sharing.BaseMessageFragment.MessageFragmentListener;
|
||||
import org.briarproject.android.sharing.ContactSelectorFragment;
|
||||
import org.briarproject.api.contact.Contact;
|
||||
import org.briarproject.api.db.DatabaseExecutor;
|
||||
import org.briarproject.api.db.DbException;
|
||||
import org.briarproject.api.privategroup.invitation.GroupInvitationManager;
|
||||
import org.briarproject.api.sync.GroupId;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class GroupInviteActivity extends BaseGroupInviteActivity
|
||||
implements MessageFragmentListener {
|
||||
|
||||
@Inject
|
||||
GroupInvitationManager groupInvitationManager;
|
||||
|
||||
@Override
|
||||
public void injectActivity(ActivityComponent component) {
|
||||
component.inject(this);
|
||||
@@ -30,8 +21,6 @@ public class GroupInviteActivity extends BaseGroupInviteActivity
|
||||
public void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
|
||||
// Initialise the group ID,
|
||||
// it will be saved and restored by the superclass
|
||||
Intent i = getIntent();
|
||||
byte[] g = i.getByteArrayExtra(GROUP_ID);
|
||||
if (g == null) throw new IllegalStateException("No GroupId in intent.");
|
||||
@@ -46,10 +35,4 @@ public class GroupInviteActivity extends BaseGroupInviteActivity
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@DatabaseExecutor
|
||||
public boolean isDisabled(GroupId g, Contact c) throws DbException {
|
||||
return !groupInvitationManager.isInvitationAllowed(c, g);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user