From a2f9ac9960dbd3e0aba472d86a0746bb3c1dac5a Mon Sep 17 00:00:00 2001
From: ljx0517 <ljx0517@gmail.com>
Date: Thu, 13 Aug 2020 00:07:41 +0800
Subject: [PATCH] sdf

---
 src/app/play/play.component.ts | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/app/play/play.component.ts b/src/app/play/play.component.ts
index 6c8fc1e..ba5c085 100644
--- a/src/app/play/play.component.ts
+++ b/src/app/play/play.component.ts
@@ -1,4 +1,4 @@
-import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, AfterViewInit } from '@angular/core';
+import {  ApplicationRef, ChangeDetectorRef, Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, AfterViewInit } from '@angular/core';
 
 import {
   Label,
@@ -61,7 +61,10 @@ export class PlayComponent implements OnInit, AfterViewInit, OnDestroy {
   animationB = '';
   saveKey = 'ww_talk';
 
+  constructor(private appRef: ApplicationRef,
+              private changeDetectorRef: ChangeDetectorRef) {
 
+  }
   ngOnInit() {
 
     this.data = {
@@ -92,12 +95,20 @@ export class PlayComponent implements OnInit, AfterViewInit, OnDestroy {
         this.data = data;
       }
       this.init();
+      this.changeDetectorRef.markForCheck();
+      this.changeDetectorRef.detectChanges();
+      this.refresh();
       if (window['air']) {
         window['air'].hideAirClassLoading(this.saveKey, this.data);
       }
     }, this.saveKey);
 
   }
+  refresh() {
+    setTimeout(() => {
+      this.appRef.tick();
+    }, 1);
+  }
   init() {
     this.talkIdx = {
       A: -1,
-- 
2.21.0