[8.0.0]PNCActions进MogoMind修改
This commit is contained in:
@@ -16,6 +16,8 @@ class PNCActionsViewModel: ViewModel(), IMoGoAutopilotPlanningActionsListener {
|
||||
private const val TAG = "PNCActionsViewModel"
|
||||
}
|
||||
|
||||
private var currentAction = ""
|
||||
|
||||
fun init(){
|
||||
CallerPlanningActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
@@ -49,9 +51,12 @@ class PNCActionsViewModel: ViewModel(), IMoGoAutopilotPlanningActionsListener {
|
||||
)
|
||||
}
|
||||
// update view
|
||||
if(actions?.isNotEmpty() == true){
|
||||
val action = AIMessage.PNCAction(actions!!,actions!!)
|
||||
AIMessageManager.post(action)
|
||||
actions?.let {
|
||||
if(it.isNotEmpty() && it != currentAction){
|
||||
currentAction = it
|
||||
val action = AIMessage.PNCAction(it+System.currentTimeMillis(),it)
|
||||
AIMessageManager.post(action)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user