diff --git a/lib/widgets/matrix.dart b/lib/widgets/matrix.dart index 4ccdfe2b..a7e2d965 100644 --- a/lib/widgets/matrix.dart +++ b/lib/widgets/matrix.dart @@ -77,8 +77,8 @@ class MatrixState extends State with WidgetsBindingObserver { return activeClient; } - Map> getBundles() { - final resBundles = >{}; + Map> getBundles() { + final resBundles = >{}; for (var i = 0; i < widget.clients.length; i++) { final bundles = widget.clients[i].accountBundles; for (final bundle in bundles) { @@ -86,8 +86,8 @@ class MatrixState extends State with WidgetsBindingObserver { continue; } resBundles[bundle.name] ??= []; - resBundles[bundle.name].add(_AccountBundleWithClientIndex( - index: i, + resBundles[bundle.name].add(_AccountBundleWithClient( + client: widget.clients[i], bundle: bundle, )); } @@ -100,7 +100,7 @@ class MatrixState extends State with WidgetsBindingObserver { : a.bundle.priority.compareTo(b.bundle.priority)); } return resBundles - .map((k, v) => MapEntry(k, v.map((vv) => vv.index).toList())); + .map((k, v) => MapEntry(k, v.map((vv) => vv.client).toList())); } bool get hasComplexBundles => getBundles().values.any((v) => v.length > 1); @@ -597,8 +597,8 @@ class FixedThreepidCreds extends ThreepidCreds { } } -class _AccountBundleWithClientIndex { - final int index; +class _AccountBundleWithClient { + final Client client; final AccountBundle bundle; - _AccountBundleWithClientIndex({this.index, this.bundle}); + _AccountBundleWithClient({this.client, this.bundle}); }