mirror of
https://github.com/ente-io/ente.git
synced 2025-08-06 14:43:20 +00:00
[mob][photos] Append '(Me)' at the end of PeopleAppBar's title if the opened person is 'Me'
This commit is contained in:
parent
e850dae7be
commit
a34d2a9c1a
@ -70,25 +70,38 @@ class _AppBarWidgetState extends State<PeopleAppBar> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
person = widget.person;
|
||||
galleryType = widget.type;
|
||||
collectionActions = CollectionActions(CollectionsService.instance);
|
||||
_selectedFilesListener = () {
|
||||
setState(() {});
|
||||
};
|
||||
collectionActions = CollectionActions(CollectionsService.instance);
|
||||
|
||||
widget.selectedFiles.addListener(_selectedFilesListener);
|
||||
|
||||
if (person.data.email == Configuration.instance.getEmail()) {
|
||||
_appBarTitle = "${widget.title} (Me)";
|
||||
} else {
|
||||
_appBarTitle = widget.title;
|
||||
}
|
||||
|
||||
_userAuthEventSubscription =
|
||||
Bus.instance.on<SubscriptionPurchasedEvent>().listen((event) {
|
||||
setState(() {});
|
||||
});
|
||||
person = widget.person;
|
||||
_appBarTitle = widget.title;
|
||||
galleryType = widget.type;
|
||||
|
||||
_peopleChangedEventSubscription =
|
||||
Bus.instance.on<PeopleChangedEvent>().listen(
|
||||
(event) {
|
||||
if (event.type == PeopleEventType.saveOrEditPerson &&
|
||||
event.source == "linkEmailToPerson") {
|
||||
_appBarTitle = event.person?.data.name;
|
||||
person = event.person!;
|
||||
|
||||
if (person.data.email == Configuration.instance.getEmail()) {
|
||||
_appBarTitle = "${person.data.name} (Me)";
|
||||
} else {
|
||||
_appBarTitle = person.data.name;
|
||||
}
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user