Skip to content

Commit

Permalink
Merge pull request #1663 from d-loose/refresh-all
Browse files Browse the repository at this point in the history
feat(updates_model): call refreshMany with empty list
  • Loading branch information
d-loose committed May 3, 2024
2 parents f8622bc + a66ad9f commit f2e1535
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/app_center/lib/src/snapd/updates_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class UpdatesModel extends ChangeNotifier {
Future<void> updateAll() async {
if (_refreshableSnaps == null) return;
try {
final changeId = await snapd.refreshMany(refreshableSnapNames.toList());
final changeId = await snapd.refreshMany([]);
_activeChangeId = changeId;
notifyListeners();
await snapd.waitChange(changeId);
Expand Down
2 changes: 1 addition & 1 deletion packages/app_center/test/updates_model_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void main() {
final model = UpdatesModel(service);
await model.refresh();
await model.updateAll();
verify(service.refreshMany(const ['firefox'])).called(1);
verify(service.refreshMany(const [])).called(1);
});

group('error stream', () {
Expand Down

0 comments on commit f2e1535

Please sign in to comment.