mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix: 'Sync project' message is incorrectly shown when 'Sync project' action is executed with unsaved Gradle files (fixes #1594)
This commit is contained in:
@@ -40,7 +40,7 @@ class ProjectSyncAction(context: Context, override val order: Int) : BaseBuildAc
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun execAction(data: ActionData): Any {
|
override suspend fun execAction(data: ActionData): Any {
|
||||||
return data.requireActivity().saveAll()
|
return data.requireActivity().saveAll(requestSync = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun postExec(data: ActionData, result: Any) {
|
override fun postExec(data: ActionData, result: Any) {
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ abstract class ProjectHandlerActivity : BaseEditorActivity() {
|
|||||||
|
|
||||||
private fun notifySyncNeeded(onConfirm: () -> Unit) {
|
private fun notifySyncNeeded(onConfirm: () -> Unit) {
|
||||||
val buildService = Lookup.getDefault().lookup(BuildService.KEY_BUILD_SERVICE)
|
val buildService = Lookup.getDefault().lookup(BuildService.KEY_BUILD_SERVICE)
|
||||||
if (buildService == null || buildService.isBuildInProgress) return
|
if (buildService == null || editorViewModel.isInitializing || buildService.isBuildInProgress) return
|
||||||
|
|
||||||
this.syncNotificationFlashbar?.dismiss()
|
this.syncNotificationFlashbar?.dismiss()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user