Merge pull request #1441 from GetStream/fix/emptyAttachmentsLabel
fix(ui,localization): change label displayed when there is no photo or videos to attach
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
- Fixed a bug where the `AttachmentPickerBottomSheet` was not able to identify the mobile browser.
|
||||
- Fixed uploading files on Windows - fixed temp file path.
|
||||
|
||||
✅ Added
|
||||
- New `noPhotoOrVideoLabel` displayed when there is no files to choose.
|
||||
|
||||
## 5.2.0
|
||||
|
||||
✅ Added
|
||||
|
||||
@@ -18,6 +18,9 @@ abstract class Translations {
|
||||
/// The label for showing no users
|
||||
String get noUsersLabel;
|
||||
|
||||
/// The label for showing no photo or video
|
||||
String get noPhotoOrVideoLabel;
|
||||
|
||||
/// The text for showing user is online
|
||||
String get userOnlineText;
|
||||
|
||||
@@ -373,6 +376,9 @@ class DefaultTranslations implements Translations {
|
||||
@override
|
||||
String get noUsersLabel => 'There are no users currently';
|
||||
|
||||
@override
|
||||
String get noPhotoOrVideoLabel => 'There is no photo or video';
|
||||
|
||||
@override
|
||||
String get retryLabel => 'Retry';
|
||||
|
||||
|
||||
+3
-3
@@ -366,7 +366,7 @@ class StreamPhotoGallery extends StatelessWidget {
|
||||
color: chatThemeData.colorTheme.disabled,
|
||||
),
|
||||
emptyTitle: Text(
|
||||
context.translations.noUsersLabel,
|
||||
context.translations.noPhotoOrVideoLabel,
|
||||
style: chatThemeData.textTheme.headline,
|
||||
),
|
||||
),
|
||||
@@ -377,7 +377,7 @@ class StreamPhotoGallery extends StatelessWidget {
|
||||
return StreamScrollViewLoadMoreError.grid(
|
||||
onTap: controller.retry,
|
||||
error: Text(
|
||||
context.translations.loadingUsersError,
|
||||
context.translations.genericErrorText,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
);
|
||||
@@ -400,7 +400,7 @@ class StreamPhotoGallery extends StatelessWidget {
|
||||
return errorBuilder?.call(context, error) ??
|
||||
Center(
|
||||
child: StreamScrollViewErrorWidget(
|
||||
errorTitle: Text(context.translations.loadingUsersError),
|
||||
errorTitle: Text(context.translations.genericErrorText),
|
||||
onRetryPressed: controller.refresh,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user