|
|
@ -19,6 +19,7 @@ import androidx.recyclerview.widget.LinearLayoutManager; |
|
|
|
import androidx.recyclerview.widget.RecyclerView; |
|
|
|
import androidx.recyclerview.widget.RecyclerView; |
|
|
|
|
|
|
|
|
|
|
|
import com.blankj.utilcode.util.CacheDiskUtils; |
|
|
|
import com.blankj.utilcode.util.CacheDiskUtils; |
|
|
|
|
|
|
|
import com.blankj.utilcode.util.ClickUtils; |
|
|
|
import com.blankj.utilcode.util.CollectionUtils; |
|
|
|
import com.blankj.utilcode.util.CollectionUtils; |
|
|
|
import com.blankj.utilcode.util.LogUtils; |
|
|
|
import com.blankj.utilcode.util.LogUtils; |
|
|
|
import com.blankj.utilcode.util.StringUtils; |
|
|
|
import com.blankj.utilcode.util.StringUtils; |
|
|
@ -32,6 +33,7 @@ import com.h6ah4i.android.widget.advrecyclerview.animator.GeneralItemAnimator; |
|
|
|
import com.h6ah4i.android.widget.advrecyclerview.animator.SwipeDismissItemAnimator; |
|
|
|
import com.h6ah4i.android.widget.advrecyclerview.animator.SwipeDismissItemAnimator; |
|
|
|
import com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeManager; |
|
|
|
import com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeManager; |
|
|
|
import com.h6ah4i.android.widget.advrecyclerview.touchguard.RecyclerViewTouchActionGuardManager; |
|
|
|
import com.h6ah4i.android.widget.advrecyclerview.touchguard.RecyclerViewTouchActionGuardManager; |
|
|
|
|
|
|
|
import com.jakewharton.rxbinding4.view.RxView; |
|
|
|
import com.kanglai.push.BR; |
|
|
|
import com.kanglai.push.BR; |
|
|
|
import com.kanglai.push.R; |
|
|
|
import com.kanglai.push.R; |
|
|
|
import com.kanglai.push.constant.CacheConstant; |
|
|
|
import com.kanglai.push.constant.CacheConstant; |
|
|
@ -46,6 +48,8 @@ import com.kanglai.push.util.HistoryMsgUtil; |
|
|
|
import com.scwang.smart.refresh.layout.api.RefreshLayout; |
|
|
|
import com.scwang.smart.refresh.layout.api.RefreshLayout; |
|
|
|
import com.umeng.message.PushAgent; |
|
|
|
import com.umeng.message.PushAgent; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
|
|
|
|
|
import ezy.ui.layout.LoadingLayout; |
|
|
|
import ezy.ui.layout.LoadingLayout; |
|
|
|
import io.reactivex.disposables.Disposable; |
|
|
|
import io.reactivex.disposables.Disposable; |
|
|
|
|
|
|
|
|
|
|
@ -63,6 +67,7 @@ public class MessageFragment extends BaseFragment<FragmentMessageBinding, Messag |
|
|
|
public RecyclerViewTouchActionGuardManager mRecyclerViewTouchActionGuardManager; |
|
|
|
public RecyclerViewTouchActionGuardManager mRecyclerViewTouchActionGuardManager; |
|
|
|
public RecyclerViewSwipeManager mRecyclerViewSwipeManager; |
|
|
|
public RecyclerViewSwipeManager mRecyclerViewSwipeManager; |
|
|
|
public RecyclerView.Adapter mWrappedAdapter; |
|
|
|
public RecyclerView.Adapter mWrappedAdapter; |
|
|
|
|
|
|
|
|
|
|
|
public MessageSwipeableRecyclerAdapter mAdapter; |
|
|
|
public MessageSwipeableRecyclerAdapter mAdapter; |
|
|
|
public RefreshLayout mRefreshLayout; |
|
|
|
public RefreshLayout mRefreshLayout; |
|
|
|
public LoadingLayout mLoadingLayout; |
|
|
|
public LoadingLayout mLoadingLayout; |
|
|
@ -83,6 +88,7 @@ public class MessageFragment extends BaseFragment<FragmentMessageBinding, Messag |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onCreate(Bundle savedInstanceState) { |
|
|
|
public void onCreate(Bundle savedInstanceState) { |
|
|
|
super.onCreate(savedInstanceState); |
|
|
|
super.onCreate(savedInstanceState); |
|
|
|
|
|
|
|
/** 接收友盟的消息 */ |
|
|
|
mSubscription = RxBus.getInstance().toObservableSticky(PushChatMessage.class) |
|
|
|
mSubscription = RxBus.getInstance().toObservableSticky(PushChatMessage.class) |
|
|
|
.compose(RxUtil.schedulersTransformer()) |
|
|
|
.compose(RxUtil.schedulersTransformer()) |
|
|
|
.compose(RxUtil.exceptionTransformer()) |
|
|
|
.compose(RxUtil.exceptionTransformer()) |
|
|
@ -93,6 +99,8 @@ public class MessageFragment extends BaseFragment<FragmentMessageBinding, Messag |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
RxSubscriptions.add(mSubscription); |
|
|
|
RxSubscriptions.add(mSubscription); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 聊天室的回传 */ |
|
|
|
instantLauncherResult = registerForActivityResult(new ActivityResultContract<LocalPushChatMsg, LocalPushChatMsg>() { |
|
|
|
instantLauncherResult = registerForActivityResult(new ActivityResultContract<LocalPushChatMsg, LocalPushChatMsg>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public LocalPushChatMsg parseResult(int resultCode, @Nullable Intent intent) { |
|
|
|
public LocalPushChatMsg parseResult(int resultCode, @Nullable Intent intent) { |
|
|
|