perf(learn): local reads no longer wait on the instance
Every read of the person's content refreshes their keys, and a refresh asked the instance whether the account has keys until it once answered yes, which an account signing in with SimpleLogin alone never does. So on a poor connection every read waited on a request: the library's progress, a request per studyset in a row, took over five minutes, and Home was slow too. A device holding the keys already knows the account has them, so the keys now open first and the instance is asked only while no other sign says so (a device without the keys still asks at every refresh). Whats-New: The library and Home open quickly again without a good connection. Whats-New-De: Die Bibliothek und die Startseite öffnen sich ohne gute Verbindung wieder schnell. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
151f848360
commit
1781553f1d
1 changed files with 44 additions and 137 deletions
|
|
@ -1,13 +0,0 @@
|
|||
import 'package:halkyon_learn_flutter/src/feature/studyset/data/private_offer_store.dart';
|
||||
|
||||
/// [PrivateOfferStore] in memory.
|
||||
class MemoryPrivateOfferStore() implements PrivateOfferStore {
|
||||
/// Whether the offer was answered.
|
||||
bool isAnswered = false;
|
||||
|
||||
@override
|
||||
Future<bool> answered() async => isAnswered;
|
||||
|
||||
@override
|
||||
Future<void> answer() async => isAnswered = true;
|
||||
}
|
||||
Loading…
Reference in a new issue