Keep a thinking level the settings dialog set
The dialog held the level for as long as it was open and read it back from the frozen row the session screen was opened with, so reopening it showed the old level until a return to the list refetched the row. The level is the session screen's own datum now, like the title.
This commit is contained in:
1 parent
fe25108c51
commit
579689cbb8
2 files changed
+19
-10
No files matched your search
@@ -323,6 +323,11 @@ fun SessionScreen(
|
||||
// reads as a rename that did not take.
|
||||
var title by remember(summary.id) { mutableStateOf(summary.title) }
|
||||
var model by remember { mutableStateOf(summary.model) }
|
||||
// The thinking level, held here for the same reason [title] is: the settings dialog can change
|
||||
// it, and the row this screen was opened from is a snapshot taken before that. Read straight
|
||||
// from the summary, a level set here was drawn as the old one again the next time the dialog
|
||||
// was opened, and only came back right after a return to the list refetched the row.
|
||||
var effort by remember(summary.id) { mutableStateOf(summary.effort) }
|
||||
var permissionMode by remember { mutableStateOf(summary.permissionMode ?: "auto") }
|
||||
// The models this provider actually offers, asked of the server rather than listed here: a
|
||||
// hardcoded list is a claim about a machine.
|
||||
@@ -2064,8 +2069,9 @@ fun SessionScreen(
|
||||
settings = settings,
|
||||
sessionId = summary.id,
|
||||
title = title,
|
||||
effort = summary.effort.takeIf { summary.takesEffort },
|
||||
effort = effort.takeIf { summary.takesEffort },
|
||||
takesEffort = summary.takesEffort,
|
||||
onEffortChanged = { effort = it },
|
||||
cachedBytes = cachedBytes,
|
||||
// The purge finishes before the epoch moves, because the relaunched opening effect
|
||||
// reads the same directory and would otherwise draw what is about to be deleted. The
|
||||
|
||||
Reference in new issue
Block a user