增加数据统计调用AnalyticsManager.track

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-03-21 19:10:09 +08:00
parent bcc8ec98c7
commit 1cc626aee7
8 changed files with 88 additions and 24 deletions

View File

@@ -8,9 +8,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.analytics.AnalyticsUtils;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.eagle.core.function.notice.Config;
import com.mogo.eagle.core.function.notice.R;
import com.mogo.eagle.core.function.notice.adapter.PushMessageAdapter;
import com.mogo.eagle.core.function.notice.model.PushBean;
@@ -25,9 +23,6 @@ import com.mogo.module.common.view.OnPreventFastClickListener;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.Map;
/**
* @author congtaowang
* @since 2020/9/1
@@ -66,7 +61,6 @@ public class MessageHistoryFragment extends MvpFragment< MessageHistoryView, Mes
mEmptyPlaceHolder = findViewById( R.id.module_push_id_not_data );
mClose = findViewById( R.id.module_push_id_close );
AnalyticsUtils.track( Config.NEWS_HISTORY_OPEN, null );
mClose.setOnClickListener( new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
@@ -76,7 +70,6 @@ public class MessageHistoryFragment extends MvpFragment< MessageHistoryView, Mes
mClear.setOnClickListener( new OnPreventFastClickListener() {
@Override
public void onClickImpl( View v ) {
AnalyticsUtils.track( Config.NEWS_HISTORY_ALL_CLEAR, null );
if ( !mClearing ) {
mClearing = true;
AnimatorUtilsKt.startClearAnimator(
@@ -97,12 +90,8 @@ public class MessageHistoryFragment extends MvpFragment< MessageHistoryView, Mes
}
mViewModel.delete( bean );
if ( action ) {
Map< String, Object > prop = new HashMap<>();
prop.put( "title", bean.getTitle() );
AnalyticsUtils.track( Config.NEWS_HISTORY_ONE_CLICK, prop );
exitSelf();
} else {
AnalyticsUtils.track( Config.NEWS_HISTORY_ONE_CLEAR, null );
mAdapter.removeItem( bean );
if ( mAdapter.getItemCount() == 0 ) {
mEmptyPlaceHolder.setVisibility( View.VISIBLE );