Skip to content

Commit

Permalink
fix close-bubble remains visible after released the bubble (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
TorryDo committed Jan 13, 2024
1 parent a1d1658 commit 69a291b
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 21 deletions.
26 changes: 26 additions & 0 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 5 additions & 12 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,19 @@ open class Bubble(
/**
* - don't call remove if the view did not call show() previously
* - call windowManager.removeViewImmediate() will make the view can't change when added again
* - add this line 'if (root.windowToken == null) return' will prevent the view from being removed in some cases
* */
open fun remove() {
if (root.windowToken == null) return
windowManager.removeView(root)
// if (root.windowToken == null) return
try {
windowManager.removeView(root)

if (containCompose) {
composeOwner!!.onPause()
composeOwner!!.onStop()
composeOwner!!.onDestroy()
}
if (containCompose) {
composeOwner!!.onPause()
composeOwner!!.onStop()
composeOwner!!.onDestroy()
}
}catch (_: Exception){}
}

fun update() {
Expand Down

0 comments on commit 69a291b

Please sign in to comment.