feat(mobile): add the number of activities to the activity button label

This commit is contained in:
idubnori
2025-12-18 01:31:29 +09:00
parent 3e8635431e
commit d63a1bcd07
12 changed files with 50 additions and 29 deletions
@@ -22,7 +22,7 @@ void main() {
test('Returns the proper count family', () async {
when(
() => activityMock.getStatistics('test-album', assetId: 'test-asset'),
).thenAnswer((_) async => const ActivityStats(comments: 5));
).thenAnswer((_) async => const ActivityStats(comments: 5, likes: 0));
// Read here to make the getStatistics call
container.read(activityStatisticsProvider('test-album', 'test-asset'));
@@ -38,7 +38,9 @@ void main() {
});
test('Adds activity', () async {
when(() => activityMock.getStatistics('test-album')).thenAnswer((_) async => const ActivityStats(comments: 10));
when(
() => activityMock.getStatistics('test-album'),
).thenAnswer((_) async => const ActivityStats(comments: 10, likes: 0));
final provider = activityStatisticsProvider('test-album');
container.listen(provider, listener.call, fireImmediately: true);
@@ -55,7 +57,7 @@ void main() {
test('Removes activity', () async {
when(
() => activityMock.getStatistics('new-album', assetId: 'test-asset'),
).thenAnswer((_) async => const ActivityStats(comments: 10));
).thenAnswer((_) async => const ActivityStats(comments: 10, likes: 0));
final provider = activityStatisticsProvider('new-album', 'test-asset');
container.listen(provider, listener.call, fireImmediately: true);