Skip to content

Commit 3a33aab

Browse files
committed
fix: remove Flashbar successful installation
1 parent c7b3573 commit 3a33aab

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

core/app/src/main/java/com/itsaky/androidide/utils/ApkInstallationSessionCallback.kt

+6-8
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,24 @@ class ApkInstallationSessionCallback(
3737
override fun onCreated(sessionId: Int) {
3838
this.sessionId = sessionId
3939
log.debug("Created package installation session: {}", sessionId)
40-
activity?._binding?.content?.apply {
41-
bottomSheet.setActionText(activity!!.getString(string.msg_installing_apk))
42-
bottomSheet.setActionProgress(0)
43-
}
4440
}
4541

4642
override fun onProgressChanged(sessionId: Int, progress: Float) {
4743
if (activity?.editorViewModel?.isBuildInProgress ?: true) {
4844
// Build in progress does not update bottom sheet action.
4945
return
5046
}
47+
5148
activity?._binding?.content?.apply {
5249
// If the visible child is the SymbolInput the keyboard is visible so it
5350
// is better not to show the action child.
5451
if (
5552
bottomSheet.showingChild() != EditorBottomSheet.CHILD_SYMBOL_INPUT &&
5653
bottomSheet.showingChild() != EditorBottomSheet.CHILD_ACTION
5754
) {
55+
bottomSheet.setActionText(
56+
activity!!.getString(string.msg_installing_apk)
57+
)
5858
bottomSheet.showChild(EditorBottomSheet.CHILD_ACTION)
5959
}
6060
bottomSheet.setActionProgress((progress * 100f).toInt())
@@ -68,11 +68,9 @@ class ApkInstallationSessionCallback(
6868
}
6969
bottomSheet.setActionProgress(0)
7070

71-
if (success) {
72-
activity?.flashSuccess(string.title_installation_success)
73-
} else activity?.flashError(string.title_installation_failed)
74-
7571
activity?.let {
72+
if (!success) flashError(string.title_installation_failed)
73+
7674
it.installationCallback?.destroy()
7775
it.installationCallback = null
7876
}

0 commit comments

Comments
 (0)