mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix: improve options menu inflation and invalidation in editor activity
This commits improves the options menu inflation and invalidation logic in the EditorActivity. The options menu is now properly invalidated in onPrepareOptionsMenu and inflated only when required. Also, the options menu is now lazily invalidated, cancelling all the previous invalidation calls in order to prevent re-inflating the options menu frequently.
This commit is contained in:
+1
-5
@@ -17,15 +17,10 @@
|
||||
|
||||
package com.itsaky.androidide.projects.models
|
||||
|
||||
import com.itsaky.androidide.eventbus.events.editor.ChangeType
|
||||
import com.itsaky.androidide.eventbus.events.editor.DocumentChangeEvent
|
||||
import com.itsaky.androidide.utils.ILogger
|
||||
import java.io.BufferedInputStream
|
||||
import java.io.BufferedReader
|
||||
import java.io.Closeable
|
||||
import java.nio.file.Path
|
||||
import java.time.Instant
|
||||
import java.util.concurrent.Semaphore
|
||||
|
||||
/**
|
||||
* A document that is opened in the editor.
|
||||
@@ -38,6 +33,7 @@ open class ActiveDocument(
|
||||
var modified: Instant,
|
||||
content: String = ""
|
||||
) {
|
||||
|
||||
var content: String = content
|
||||
internal set
|
||||
|
||||
|
||||
Reference in New Issue
Block a user