优化汇总(20170106),礼包相关优化补充(20170104), 快速点击弹窗按钮可能会出现卡死
This commit is contained in:
@ -18,11 +18,14 @@ import com.gh.gamecenter.eventbus.EBConcernChanged;
|
||||
import com.gh.gamecenter.gamedetail.GameDetailAdapter;
|
||||
import com.gh.gamecenter.retrofit.Response;
|
||||
import com.gh.gamecenter.retrofit.RetrofitManager;
|
||||
import com.jakewharton.rxbinding.view.RxView;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import rx.android.schedulers.AndroidSchedulers;
|
||||
import rx.functions.Action1;
|
||||
import rx.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
@ -87,6 +90,23 @@ public class GameDetailActivity extends BaseDetailActivity implements View.OnCli
|
||||
reuse_ll_loading.setVisibility(View.GONE);
|
||||
reuse_no_connection.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
// 防抖处理
|
||||
RxView.clicks(iv_share)
|
||||
.throttleFirst(1, TimeUnit.SECONDS)
|
||||
.subscribe(new Action1<Void>() {
|
||||
@Override
|
||||
public void call(Void aVoid) {
|
||||
Map<String, Object> kv = new HashMap<>();
|
||||
kv.put("点击", "分享");
|
||||
DataUtils.onEvent(GameDetailActivity.this, "插件数据", gameEntity.getName(), kv);
|
||||
|
||||
DataCollectionUtils.uploadClick(GameDetailActivity.this, "分享", "游戏详情", gameEntity.getName());
|
||||
|
||||
String url = "http://www.ghzhushou.com/game/" + adapter.getGameDetailEntity().getShareCode();
|
||||
showShare(url, gameEntity.getName(), gameEntity.getIcon(), null, gameEntity.getTag());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -127,15 +147,6 @@ public class GameDetailActivity extends BaseDetailActivity implements View.OnCli
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
} else if (v == iv_share) {
|
||||
Map<String, Object> kv = new HashMap<>();
|
||||
kv.put("点击", "分享");
|
||||
DataUtils.onEvent(this, "插件数据", gameEntity.getName(), kv);
|
||||
|
||||
DataCollectionUtils.uploadClick(this, "分享", "游戏详情", gameEntity.getName());
|
||||
|
||||
String url = "http://www.ghzhushou.com/game/" + adapter.getGameDetailEntity().getShareCode();
|
||||
showShare(url, gameEntity.getName(), gameEntity.getIcon(), null, gameEntity.getTag());
|
||||
} else if (v == actionbar_rl_back) {
|
||||
if (ChangeSkinUtils.isChecking) {
|
||||
DialogUtils.showWarningDialog(GameDetailActivity.this, "退出提示",
|
||||
|
||||
Reference in New Issue
Block a user