[mob][photos] Replace contact's email with name if linked to a person in all screen related to collaborative albums created by the account owner
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:logging/logging.dart';
|
||||
import 'package:photos/core/configuration.dart';
|
||||
import "package:photos/core/errors.dart";
|
||||
import 'package:photos/db/files_db.dart';
|
||||
import "package:photos/extensions/user_extension.dart";
|
||||
import "package:photos/generated/l10n.dart";
|
||||
import 'package:photos/models/api/collection/create_request.dart';
|
||||
import "package:photos/models/api/collection/user.dart";
|
||||
@@ -192,7 +193,7 @@ class CollectionActions {
|
||||
),
|
||||
],
|
||||
title: S.of(context).removeWithQuestionMark,
|
||||
body: S.of(context).removeParticipantBody(user.email),
|
||||
body: S.of(context).removeParticipantBody(user.displayName ?? user.email),
|
||||
);
|
||||
if (actionResult?.action != null) {
|
||||
if (actionResult!.action == ButtonAction.error) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:email_validator/email_validator.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:photos/core/configuration.dart';
|
||||
import "package:photos/extensions/user_extension.dart";
|
||||
import "package:photos/generated/l10n.dart";
|
||||
import "package:photos/models/api/collection/user.dart";
|
||||
import 'package:photos/models/collection/collection.dart';
|
||||
@@ -139,7 +140,8 @@ class _AddParticipantPage extends State<AddParticipantPage> {
|
||||
children: [
|
||||
MenuItemWidget(
|
||||
captionedTextWidget: CaptionedTextWidget(
|
||||
title: currentUser.email,
|
||||
title: currentUser.displayName ??
|
||||
currentUser.email,
|
||||
),
|
||||
leadingIconSize: 24.0,
|
||||
leadingIconWidget: UserAvatarWidget(
|
||||
@@ -239,7 +241,13 @@ class _AddParticipantPage extends State<AddParticipantPage> {
|
||||
results.where((e) => e).length;
|
||||
showToast(
|
||||
context,
|
||||
widget.isAddingViewer ? S.of(context).viewersSuccessfullyAdded(noOfSuccessfullAdds) : S.of(context).collaboratorsSuccessfullyAdded(noOfSuccessfullAdds),
|
||||
widget.isAddingViewer
|
||||
? S
|
||||
.of(context)
|
||||
.viewersSuccessfullyAdded(noOfSuccessfullAdds)
|
||||
: S.of(context).collaboratorsSuccessfullyAdded(
|
||||
noOfSuccessfullAdds,
|
||||
),
|
||||
);
|
||||
|
||||
if (!results.any((e) => e == false) && mounted) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import "package:photos/extensions/user_extension.dart";
|
||||
import "package:photos/generated/l10n.dart";
|
||||
import "package:photos/models/api/collection/user.dart";
|
||||
import 'package:photos/models/collection/collection.dart';
|
||||
@@ -58,7 +59,7 @@ class _ManageIndividualParticipantState
|
||||
title: S.of(context).manage,
|
||||
),
|
||||
Text(
|
||||
widget.user.email.toString().trim(),
|
||||
widget.user.displayName ?? widget.user.email,
|
||||
textAlign: TextAlign.left,
|
||||
style:
|
||||
textTheme.small.copyWith(color: colorScheme.textMuted),
|
||||
@@ -117,7 +118,7 @@ class _ManageIndividualParticipantState
|
||||
body: S
|
||||
.of(context)
|
||||
.cannotAddMorePhotosAfterBecomingViewer(
|
||||
widget.user.email,
|
||||
widget.user.displayName ?? widget.user.email,
|
||||
),
|
||||
isCritical: true,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user