提交 ff5d2675 authored 作者: JarvanMo's avatar JarvanMo

add remvoeListeners

上级 df3ad4c1
......@@ -44,6 +44,10 @@ class FluwxPlugin(private val registrar: Registrar, channel: MethodChannel) : Me
init {
fluwxShareHandler.setRegistrar(registrar)
fluwxShareHandler.setMethodChannel(channel)
registrar.addViewDestroyListener {
fluwxAuthHandler.removeAllListeners()
false
}
}
override fun onMethodCall(call: MethodCall, result: Result): Unit {
......@@ -102,4 +106,5 @@ class FluwxPlugin(private val registrar: Registrar, channel: MethodChannel) : Me
}
}
......@@ -81,4 +81,8 @@ internal class FluwxAuthHandler(private val methodChannel: MethodChannel) {
result.success(qrCodeAuth.stopAuth())
}
fun removeAllListeners(){
qrCodeAuth.removeAllListeners()
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论