Skip to content

Commit

Permalink
fix(mobile): Fix asset selector title bar text (#9273)
Browse files Browse the repository at this point in the history
Fix title bar text
  • Loading branch information
ddshd authored May 8, 2024
1 parent 3790d8f commit ae08abd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions mobile/assets/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@
"share_add_photos": "Add photos",
"share_add_title": "Add a title",
"share_create_album": "Create album",
"share_assets_selected": "{} selected",
"shared_album_activities_input_disable": "Comment is disabled",
"shared_album_activities_input_hint": "Say something",
"shared_album_activity_remove_content": "Do you want to delete this activity?",
Expand Down
12 changes: 4 additions & 8 deletions mobile/lib/pages/common/album_asset_selection.page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ class AlbumAssetSelectionPage extends HookConsumerWidget {
final selected = useState<Set<Asset>>(existingAssets);
final selectionEnabledHook = useState(true);

String buildAssetCountText() {
return selected.value.length.toString();
}

Widget buildBody(RenderList renderList) {
return ImmichAssetGrid(
renderList: renderList,
Expand Down Expand Up @@ -63,10 +59,10 @@ class AlbumAssetSelectionPage extends HookConsumerWidget {
'share_add_photos',
style: TextStyle(fontSize: 18),
).tr()
: Text(
buildAssetCountText(),
style: const TextStyle(fontSize: 18),
),
: const Text(
'share_assets_selected',
style: TextStyle(fontSize: 18),
).tr(args: [selected.value.length.toString()]),
centerTitle: false,
actions: [
if (selected.value.isNotEmpty || canDeselect)
Expand Down

0 comments on commit ae08abd

Please sign in to comment.