opt
This commit is contained in:
@@ -80,13 +80,13 @@ public class V2XSurroundingDetailAdapter extends RecyclerView.Adapter<V2XSurroun
|
||||
showView(exploreWay.isFabulous());
|
||||
|
||||
mHeartLikeView.setOnClickCallListener(v -> {
|
||||
Logger.d(V2XConst.MODULE_NAME, "反馈有用");
|
||||
Logger.d(V2XConst.MODULE_NAME, "反馈有用 position = " + position);
|
||||
roadReportTrue(exploreWay);
|
||||
showView(true);
|
||||
});
|
||||
|
||||
mUnHeartLikeView.setOnClickCallListener(v -> {
|
||||
Logger.d(V2XConst.MODULE_NAME, "反馈无用");
|
||||
Logger.d(V2XConst.MODULE_NAME, "反馈无用 position = " + position);
|
||||
roadReportErr(exploreWay);
|
||||
showView(true);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.module.v2x.entity.panel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 返回刷新
|
||||
*/
|
||||
public class BackRefreshInfo implements Serializable {
|
||||
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import android.text.Spanned
|
||||
import android.text.style.AbsoluteSizeSpan
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.text.style.StyleSpan
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.RadioButton
|
||||
@@ -31,6 +30,7 @@ import com.mogo.module.v2x.V2XConst.MODULE_NAME
|
||||
import com.mogo.module.v2x.V2XServiceManager
|
||||
import com.mogo.module.v2x.adapter.V2XEventPagerAdapter
|
||||
import com.mogo.module.v2x.adapter.V2XSurroundingDetailAdapter
|
||||
import com.mogo.module.v2x.entity.panel.BackRefreshInfo
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction
|
||||
import com.mogo.module.v2x.presenter.EventPanelPresenter
|
||||
import com.mogo.module.v2x.utils.TrackUtils
|
||||
@@ -211,6 +211,7 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
}
|
||||
|
||||
mBackImage?.setOnClickListener {
|
||||
EventBus.getDefault().post(BackRefreshInfo())
|
||||
showBaseUi(true)
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.adapter.V2XShareEventAdapter;
|
||||
import com.mogo.module.v2x.adapter.V2XSurroundingAdapter;
|
||||
import com.mogo.module.v2x.adapter.V2XSurroundingDetailAdapter;
|
||||
import com.mogo.module.v2x.entity.panel.BackRefreshInfo;
|
||||
import com.mogo.module.v2x.entity.panel.SurroundingConstruction;
|
||||
import com.mogo.module.v2x.listener.SurroundingItemClickListener;
|
||||
import com.mogo.module.v2x.presenter.SurroundingEventPresenter;
|
||||
@@ -55,6 +56,8 @@ import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -125,7 +128,6 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
|
||||
initData();
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -137,6 +139,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
EventBus.getDefault().register(this);
|
||||
surroundingEventPresenter = new SurroundingEventPresenter(getContext(), this);
|
||||
mApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(getContext());
|
||||
|
||||
@@ -304,6 +307,15 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
return poiTypes;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onBackRefresh(final BackRefreshInfo event) {
|
||||
if (event == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
initData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理marker的显示
|
||||
*
|
||||
@@ -445,6 +457,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user