mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 01:11:16 +03:00
feat(mobile): add the number of activities to the activity button label
This commit is contained in:
@@ -4,12 +4,12 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
part 'activity_statistics.provider.g.dart';
|
||||
|
||||
// ignore: unintended_html_in_doc_comment
|
||||
/// Maintains the current number of comments by <shared-album, asset>
|
||||
/// Maintains the current number of activities (comments + likes) by <shared-album, asset>
|
||||
@riverpod
|
||||
class ActivityStatistics extends _$ActivityStatistics {
|
||||
@override
|
||||
int build(String albumId, [String? assetId]) {
|
||||
ref.watch(activityServiceProvider).getStatistics(albumId, assetId: assetId).then((stats) => state = stats.comments);
|
||||
ref.watch(activityServiceProvider).getStatistics(albumId, assetId: assetId).then((stats) => state = stats.total);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user