mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
Merge branch 'nav-drawer-instance-restore-fix' into 'master'
Fixing fragment instance restore Alas, it turns out that my neat way of integrating the Fragments into the dependency graph was not without problems. Me and @grote discovered that this presented us with a lot of problems on orientation changes as the Activity is re-created, and therefore parts of the dependency graph. The simplest solution was simply to abandon the idea, i.e. with this branch Fragments are no longer part of the dependency graph. See merge request !215
This commit is contained in:
@@ -14,6 +14,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.briarproject.R;
|
||||
import org.briarproject.android.ActivityComponent;
|
||||
import org.briarproject.android.fragment.BaseFragment;
|
||||
import org.briarproject.android.keyagreement.KeyAgreementActivity;
|
||||
import org.briarproject.android.util.BriarRecyclerView;
|
||||
@@ -84,9 +85,13 @@ public class ContactListFragment extends BaseFragment implements EventListener {
|
||||
@Inject
|
||||
protected volatile ForumSharingManager forumSharingManager;
|
||||
|
||||
@Inject
|
||||
public ContactListFragment() {
|
||||
|
||||
public static ContactListFragment newInstance() {
|
||||
|
||||
Bundle args = new Bundle();
|
||||
|
||||
ContactListFragment fragment = new ContactListFragment();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,6 +99,11 @@ public class ContactListFragment extends BaseFragment implements EventListener {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectFragment(ActivityComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
@@ -154,7 +164,6 @@ public class ContactListFragment extends BaseFragment implements EventListener {
|
||||
return contentView;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
Reference in New Issue
Block a user