You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -75,7 +77,7 @@ internal fun PhotoReasoningRoute(
75
77
val detectedCommands by viewModel.detectedCommands.collectAsState()
76
78
val systemMessage by viewModel.systemMessage.collectAsState()
77
79
val chatMessages by viewModel.chatMessagesFlow.collectAsState()
78
-
val modelUpdateTrigger by viewModel.modelUpdateTrigger.collectAsState() //<<< NEU: Trigger beobachten
80
+
val modelUpdateTrigger by viewModel.modelUpdateTrigger.collectAsState() // Trigger beobachten
79
81
80
82
val coroutineScope = rememberCoroutineScope()
81
83
val imageRequestBuilder =ImageRequest.Builder(LocalContext.current)
@@ -84,27 +86,14 @@ internal fun PhotoReasoningRoute(
84
86
val mainActivity = context as?MainActivity
85
87
86
88
DisposableEffect(viewModel) {
87
-
// Entferne den Aufruf von setPhotoReasoningViewModel
88
-
// mainActivity?.setPhotoReasoningViewModel(viewModel) // Nicht mehr benötigt
89
-
90
89
Log.d("PhotoReasoningRoute", "PhotoReasoningRoute is active. ViewModel instance should be available via MainActivity.getInstance().retrievePhotoReasoningViewModel()")
91
-
92
-
// Check if accessibility service is enabled
93
90
mainActivity?.checkAccessibilityServiceEnabled()
94
-
95
-
// Load the saved system message and chat history
96
91
viewModel.loadSystemMessage(context)
97
-
98
-
onDispose {
99
-
// Optional: clear the reference when navigating away
// <<< KORREKTUR: Setze den LazyListState zurück >>>
290
275
coroutineScope.launch {
291
276
listState.scrollToItem(0) // Scrolle zum Anfang (leere Liste)
292
277
}
293
-
// Leere auch die lokalen Bild-URIs
294
278
imageUris.clear()
295
-
userQuestion =""// Leere auch das Textfeld
279
+
userQuestion =""
296
280
},
297
281
modifier =Modifier
298
282
.padding(top =4.dp)
@@ -386,8 +370,8 @@ fun PhotoReasoningScreen(
386
370
isCommand.ScrollRightFromCoordinates->"Nach rechts scrollen von Position (${command.x}, ${command.y}) mit Distanz ${command.distance}px und Dauer ${command.duration}ms"
0 commit comments