wildfirechat / android-chat

即时通讯,聊天,野火IMAndroid客户端,支持Android 4.x —— 最新
http://docs.wildfirechat.cn
Other
2.54k stars 890 forks source link

最后升级出现的一个BUG #606

Closed mankind-evolve closed 2 years ago

mankind-evolve commented 2 years ago

我以前的版本没有问题

我注意到出现BUG的代码改动为
package cn.wildfire.chat.kit.conversationlist.ConversationListFragment line 81行

以前的代码 conversationListViewModel = new ViewModelProvider(this, new ConversationListViewModelFactory(types, lines)) .get(ConversationListViewModel.class); 现在的代码 conversationListViewModel = new ViewModelProvider(getActivity(), new ConversationListViewModelFactory(types, lines)) .get(ConversationListViewModel.class);

导致出现的问题

public static  List<Conversation.ConversationType> types = Arrays.asList(
    Conversation.ConversationType.Single
);  

这个参数失效,无法区分群组和单聊 ,改成以前的this就可以区分