feat: 修复Sentry上报的BUG
This commit is contained in:
@ -456,7 +456,7 @@ public class HaloApp extends MultiDexApplication {
|
||||
.getInstance()
|
||||
.build(RouteConsts.provider.push)
|
||||
.navigation();
|
||||
pushProvider.initialize(this);
|
||||
if (pushProvider != null) pushProvider.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -469,12 +469,14 @@ public class HaloApp extends MultiDexApplication {
|
||||
.build(RouteConsts.provider.push)
|
||||
.navigation();
|
||||
|
||||
if (pushProvider == null) return;
|
||||
|
||||
// 绑定账号
|
||||
Single<String> bindAccountSingle = pushProvider.bindAccount(getOAID());
|
||||
|
||||
// 绑定标签
|
||||
Single<String> bindTagSingle = pushProvider.bindTag(mChannel)
|
||||
.subscribeOn(Schedulers.io());
|
||||
Single<String> bindTagSingle = !TextUtils.isEmpty(mChannel)
|
||||
? pushProvider.bindTag(mChannel).subscribeOn(Schedulers.io()) : null;
|
||||
|
||||
// 初始化推送
|
||||
pushProvider
|
||||
@ -482,8 +484,13 @@ public class HaloApp extends MultiDexApplication {
|
||||
.flatMap((response) -> {
|
||||
// 绑定别名、标签和账号任意一个流程失败,都不会影响其他流程的执行
|
||||
Single<String> single = bindAccountSingle
|
||||
.onErrorReturn((e) -> response)
|
||||
.zipWith(bindTagSingle.onErrorReturn((e) -> response), (s1, s2) -> response);
|
||||
.onErrorReturn((e) -> response);
|
||||
|
||||
if (bindTagSingle != null) {
|
||||
single = single
|
||||
.zipWith(bindTagSingle.onErrorReturn((e) -> response), (s1, s2) -> response);
|
||||
}
|
||||
|
||||
if (UserManager.getInstance().isLoggedIn()) {
|
||||
String userId = UserManager.getInstance().getUserId();
|
||||
// 绑定别名
|
||||
|
||||
Reference in New Issue
Block a user