File tree 2 files changed +2
-11
lines changed
lib/pangea/analytics_misc
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -15,22 +15,13 @@ import 'package:fluffychat/pangea/morphs/get_grammar_copy.dart';
15
15
/// A wrapper around a list of [OneConstructUse] s, used to simplify
16
16
/// the process of filtering / sorting / displaying the events.
17
17
class ConstructListModel {
18
- void dispose () {
19
- _constructMap = {};
20
- _constructList = [];
21
- prevXP = 0 ;
22
- totalXP = 0 ;
23
- level = 0 ;
24
- _uses.clear ();
25
- }
26
-
27
18
final List <OneConstructUse > _uses = [];
28
19
List <OneConstructUse > get uses => _uses;
29
20
List <OneConstructUse > get truncatedUses => _uses.take (100 ).toList ();
30
21
31
22
/// A map of lemmas to ConstructUses, each of which contains a lemma
32
23
/// key = lemma + constructType.string, value = ConstructUses
33
- Map <String , ConstructUses > _constructMap = {};
24
+ final Map <String , ConstructUses > _constructMap = {};
34
25
35
26
/// Storing this to avoid re-running the sort operation each time this needs to
36
27
/// be accessed. It contains the same information as _constructMap, but sorted.
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ class GetAnalyticsController extends BaseController {
117
117
/// Clear all cached analytics data.
118
118
@override
119
119
void dispose () {
120
- constructListModel. dispose ( );
120
+ constructListModel = ConstructListModel (uses : [] );
121
121
_analyticsUpdateSubscription? .cancel ();
122
122
_analyticsUpdateSubscription = null ;
123
123
_joinSpaceSubscription? .cancel ();
You can’t perform that action at this time.
0 commit comments