mirror of
https://github.com/ChronosX88/Influence-P2P.git
synced 2024-11-22 15:22:18 +00:00
Fixed crash when starting app (NullPointer in ChatListPresenter/Fragment)
This commit is contained in:
parent
4dd6eca565
commit
a8bc9ab2fc
@ -14,8 +14,8 @@ public class ChatListPresenter implements ChatListPresenterContract {
|
|||||||
public ChatListPresenter(ChatListViewContract view) {
|
public ChatListPresenter(ChatListViewContract view) {
|
||||||
this.view = view;
|
this.view = view;
|
||||||
chatListAdapter = new ChatListAdapter();
|
chatListAdapter = new ChatListAdapter();
|
||||||
this.view.setRecycleAdapter(chatListAdapter);
|
|
||||||
this.logic = new ChatListLogic();
|
this.logic = new ChatListLogic();
|
||||||
|
this.view.setRecycleAdapter(chatListAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -28,7 +28,6 @@ public class ChatListFragment extends Fragment implements ChatListViewContract,
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
presenter = new ChatListPresenter(this);
|
|
||||||
AppHelper.getObservable().register(this, MainObservable.UI_ACTIONS_CHANNEL);
|
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) {
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
chatList = view.findViewById(R.id.chatlist_container);
|
chatList = view.findViewById(R.id.chatlist_container);
|
||||||
|
presenter = new ChatListPresenter(this);
|
||||||
presenter.updateChatList();
|
presenter.updateChatList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user