文章详情增加评论入口
This commit is contained in:
@ -483,7 +483,6 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
}
|
||||
if (isNewFirstLaunch) {
|
||||
getPluginUpdate();
|
||||
initConcern(); // 初始化关注
|
||||
// sp.edit().putBoolean("isNewFirstLaunchV" + PackageUtils.getVersion(getApplicationContext()), false).apply();
|
||||
}
|
||||
|
||||
@ -505,6 +504,7 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
public void run() {
|
||||
// 注册设备
|
||||
TokenUtils.register(MainActivity.this);
|
||||
initConcern(); // 初始化关注
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
@ -555,6 +555,11 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
final ArrayList<GameEntity> concernDigest = new ArrayList<>();
|
||||
|
||||
final int size = arrGameId.size();
|
||||
|
||||
if (size == 0) {
|
||||
EventBus.getDefault().post(new EBUISwitch("NewsFragment", -2)); // 没有关注
|
||||
}
|
||||
|
||||
initConcernCount = 0;
|
||||
for (String gameId : arrGameId) {
|
||||
JsonObjectExtendedRequest request = new JsonObjectExtendedRequest(
|
||||
@ -639,6 +644,14 @@ public class MainActivity extends BaseFragmentActivity implements OnClickListene
|
||||
private void getInstalledListFromServer() {
|
||||
ArrayList<String> list = PackageUtils.getAllPackageName(getApplicationContext());
|
||||
if (list.isEmpty()) {
|
||||
if (isNewFirstLaunch) { // 延迟0.3s,防止页面未注册eventbus,接收消息失败
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
EventBus.getDefault().post(new EBUISwitch("NewsFragment", -1)); //通知更新推荐关注小版块
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user