Skip to content

Commit

Permalink
优化主页更新逻辑。
Browse files Browse the repository at this point in the history
  • Loading branch information
xfl12345 committed Jun 3, 2023
1 parent c3eaeed commit 851882f
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,9 @@ public void updateButton(ButtonStatus status, String pendingMessage) {
public void onResume() {
context.addWebSocketServiceConnectionListener(this);
super.onResume();
if (ButtonStatus.PENDING.equals(buttonStatus)) {
if (websocketService == null || ButtonStatus.PENDING.equals(buttonStatus)) {
updateButton(isAllOK() ? ButtonStatus.OK : ButtonStatus.FAILED, "");
}
// new Thread(() -> {
// try {
// Thread.sleep(5000);
// } catch (InterruptedException e) {
// // ignore
// }
// if (websocketService == null || (!websocketService.isWebSocketReconnecting() && !websocketService.isRecreatingWebSocket())) {
// updateButton(isAllOK() ? ButtonStatus.OK : ButtonStatus.FAILED, "");
// }
// }, HomeFragment.class.getName() + "_on_resume_timeout_recheck").start();
}

@Override
Expand Down

0 comments on commit 851882f

Please sign in to comment.