We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b95b8d2 + 651b4da commit 0a1e487Copy full SHA for 0a1e487
library/src/main/java/com/opensource/svgaplayer/SVGAParser.kt
@@ -102,8 +102,7 @@ class SVGAParser(private val context: Context) {
102
fun parse(inputStream: InputStream, cacheKey: String, callback: ParseCompletion) {
103
Thread({
104
val videoItem = parse(inputStream, cacheKey)
105
- Thread({
106
- if (videoItem != null) {
+ if (videoItem != null) {
107
Handler(context.mainLooper).post {
108
callback.onComplete(videoItem)
109
}
@@ -113,7 +112,6 @@ class SVGAParser(private val context: Context) {
113
112
callback.onError()
114
115
116
- }).start()
117
}).start()
118
119
@@ -307,4 +305,4 @@ class SVGAParser(private val context: Context) {
307
305
zipInputStream.close()
308
306
309
310
-}
+}
0 commit comments