mirror of
https://github.com/Livinglist/Hacki.git
synced 2025-08-26 03:02:13 +08:00

* bumped version. * improved cache. * improved comment cache. * updated default val for navigationMode.
11 lines
334 B
Dart
11 lines
334 B
Dart
class DraftCache {
|
|
static final Map<int, String> _drafts = <int, String>{};
|
|
|
|
void removeDraft({required int replyingTo}) => _drafts.remove(replyingTo);
|
|
|
|
void cacheDraft({required String text, required int replyingTo}) =>
|
|
_drafts[replyingTo] = text;
|
|
|
|
String? getDraft({required int replyingTo}) => _drafts[replyingTo];
|
|
}
|