refactor(mobile): encapsulate most access to photomanager in repository (#12754)

* refactor(mobile): encapsulate most access to photomanager in repository
This commit is contained in:
Fynn Petersen-Frey 2024-09-18 17:15:52 +02:00 committed by GitHub
parent 6740c67ed8
commit 6995cc2b38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 1205 additions and 500 deletions

View file

@ -183,23 +183,13 @@ class AlbumInfoCard extends HookConsumerWidget {
),
Padding(
padding: const EdgeInsets.only(top: 2.0),
child: FutureBuilder(
builder: ((context, snapshot) {
if (snapshot.hasData) {
return Text(
snapshot.data.toString() +
(album.isAll
? " (${'backup_all'.tr()})"
: ""),
style: TextStyle(
fontSize: 12,
color: Colors.grey[600],
),
);
}
return const Text("0");
}),
future: album.assetCount,
child: Text(
album.assetCount.toString() +
(album.isAll ? " (${'backup_all'.tr()})" : ""),
style: TextStyle(
fontSize: 12,
color: Colors.grey[600],
),
),
),
],
@ -208,7 +198,7 @@ class AlbumInfoCard extends HookConsumerWidget {
IconButton(
onPressed: () {
context.pushRoute(
AlbumPreviewRoute(album: album.albumEntity),
AlbumPreviewRoute(album: album.album),
);
},
icon: Icon(