chore: in invite page, display different text in public user list is empty and user has searched (#5885)
This commit is contained in:
parent
c73776c79e
commit
4661d2caf4
3 changed files with 16 additions and 4 deletions
|
|
@ -5389,5 +5389,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"youSentActivitySummary": "You sent an activity summary"
|
||||
"youSentActivitySummary": "You sent an activity summary",
|
||||
"emptyInviteSearchHint": "Don't see who you're looking for? They may need to set their profile to public in Learning Settings"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ class PangeaInvitationSelectionController
|
|||
|
||||
List<Profile> foundProfiles = [];
|
||||
Timer? coolDown;
|
||||
String? lastSearch;
|
||||
|
||||
InvitationFilter filter = InvitationFilter.knocking;
|
||||
|
||||
|
|
@ -369,7 +370,10 @@ class PangeaInvitationSelectionController
|
|||
setState(() => foundProfiles = []);
|
||||
}
|
||||
|
||||
setState(() => loading = true);
|
||||
setState(() {
|
||||
loading = true;
|
||||
lastSearch = null;
|
||||
});
|
||||
final matrix = Matrix.of(context);
|
||||
SearchUserDirectoryResponse response;
|
||||
try {
|
||||
|
|
@ -380,7 +384,10 @@ class PangeaInvitationSelectionController
|
|||
).showSnackBar(SnackBar(content: Text((e).toLocalizedString(context))));
|
||||
return;
|
||||
} finally {
|
||||
setState(() => loading = false);
|
||||
setState(() {
|
||||
loading = false;
|
||||
lastSearch = text;
|
||||
});
|
||||
}
|
||||
|
||||
final results = response.results;
|
||||
|
|
|
|||
|
|
@ -156,7 +156,11 @@ class PangeaInvitationSelectionView extends StatelessWidget {
|
|||
? Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Text(
|
||||
room.isSpace
|
||||
controller.controller.text.isNotEmpty &&
|
||||
controller.controller.text ==
|
||||
controller.lastSearch
|
||||
? L10n.of(context).emptyInviteSearchHint
|
||||
: room.isSpace
|
||||
? L10n.of(context).publicInviteDescSpace
|
||||
: L10n.of(context).publicInviteDescChat,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue