feat(mobile): Share album name and adaptive shared album display (#2017)

* shows the owner name of shared albums

* responsive and better names

* rich text

* localization and overflow

* unused import

* adds on tap

* suppress owner name for regular album view

* aspect ratio

* Add some styling to text

* More styling

* Style album thumbnail name

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
martyfuhry
2023-03-19 15:47:51 -04:00
committed by GitHub
parent b29c43d86a
commit 646b912da8
5 changed files with 153 additions and 32 deletions

View File

@@ -51,6 +51,24 @@ class Album {
@ignore
String? get ownerId => owner.value?.id;
@ignore
String? get ownerName {
// Guard null owner
if (owner.value == null) {
return null;
}
final name = <String>[];
if (owner.value?.firstName != null) {
name.add(owner.value!.firstName);
}
if (owner.value?.lastName != null) {
name.add(owner.value!.lastName);
}
return name.join(' ');
}
Future<void> loadSortedAssets() async {
_sortedAssets = await assets.filter().sortByFileCreatedAt().findAll();
}