diff --git a/app/src/main/java/io/github/chronosx88/influence/presenters/ChatListPresenter.java b/app/src/main/java/io/github/chronosx88/influence/presenters/ChatListPresenter.java index d1b4158..94fd534 100644 --- a/app/src/main/java/io/github/chronosx88/influence/presenters/ChatListPresenter.java +++ b/app/src/main/java/io/github/chronosx88/influence/presenters/ChatListPresenter.java @@ -14,8 +14,8 @@ public class ChatListPresenter implements ChatListPresenterContract { public ChatListPresenter(ChatListViewContract view) { this.view = view; chatListAdapter = new ChatListAdapter(); - this.view.setRecycleAdapter(chatListAdapter); this.logic = new ChatListLogic(); + this.view.setRecycleAdapter(chatListAdapter); } @Override diff --git a/app/src/main/java/io/github/chronosx88/influence/views/fragments/ChatListFragment.java b/app/src/main/java/io/github/chronosx88/influence/views/fragments/ChatListFragment.java index a0d13ee..4384a9d 100644 --- a/app/src/main/java/io/github/chronosx88/influence/views/fragments/ChatListFragment.java +++ b/app/src/main/java/io/github/chronosx88/influence/views/fragments/ChatListFragment.java @@ -28,7 +28,6 @@ public class ChatListFragment extends Fragment implements ChatListViewContract, @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - presenter = new ChatListPresenter(this); AppHelper.getObservable().register(this, MainObservable.UI_ACTIONS_CHANNEL); } @@ -42,6 +41,7 @@ public class ChatListFragment extends Fragment implements ChatListViewContract, public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); chatList = view.findViewById(R.id.chatlist_container); + presenter = new ChatListPresenter(this); presenter.updateChatList(); }