What one instance proved about its reply frames says nothing of another
CI / check (push) Canceled after 0s
CI / check (push) Canceled after 0s
The drawer's model outlives a switch of instance: whether replies' ends are said is learned again for the instance now in use. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 file changed
+12
-2
@@ -250,7 +250,14 @@ class ChatsViewModel(app: Application) : AndroidViewModel(app) {
|
||||
* badge is then what the drawer's own read said.
|
||||
*/
|
||||
suspend fun watchReports() {
|
||||
val frames = runCatching { getApplication<Application>().lembas.eventFrames() }.getOrNull() ?: return
|
||||
val app = getApplication<Application>().lembas
|
||||
// What one instance proved about its frames says nothing of another.
|
||||
val instance = app.instances.current()?.id
|
||||
if (instance != endsOf) {
|
||||
ends = ReplyEnds()
|
||||
endsOf = instance
|
||||
}
|
||||
val frames = runCatching { app.eventFrames() }.getOrNull() ?: return
|
||||
try {
|
||||
frames.collect { frame ->
|
||||
// An instance this app refuses shows its refusal and nothing else.
|
||||
@@ -274,7 +281,10 @@ class ChatsViewModel(app: Application) : AndroidViewModel(app) {
|
||||
var open: String? = null
|
||||
|
||||
/** Whether this instance says when replies end; until it has, a running row is read again now and then. */
|
||||
private val ends = ReplyEnds()
|
||||
private var ends = ReplyEnds()
|
||||
|
||||
/** The instance [ends] is about, by its id. */
|
||||
private var endsOf: String? = null
|
||||
|
||||
fun shown(now: Boolean) {
|
||||
shown = now
|
||||
|
||||
Reference in new issue
Block a user