feat: update agent match calculation, enable tag expansion in search, increase socket reconnect attempts, and disable profile title editing

This commit is contained in:
pradeepkumar
2026-03-31 05:32:22 +05:30
parent 8ee77420af
commit 2af7eca16a
3 changed files with 31 additions and 23 deletions

View File

@@ -400,14 +400,15 @@ class _AgentCard extends StatefulWidget {
class _AgentCardState extends State<_AgentCard> {
bool _bioExpanded = false;
bool _tagsExpanded = false;
@override
Widget build(BuildContext context) {
final agent = widget.agent;
final specializations = agent.specializations;
final bio = agent.description;
final matchPercent = agent.averageRating != null
? '${(agent.averageRating! * 20).round()}%'
final matchPercent = agent.matchPercentage != null
? '${agent.matchPercentage}%'
: null;
return Container(
@@ -679,11 +680,15 @@ class _AgentCardState extends State<_AgentCard> {
spacing: 6,
runSpacing: 6,
children: [
...specializations
.take(6)
...(_tagsExpanded
? specializations
: specializations.take(6))
.map((tag) => _buildTag(tag)),
if (specializations.length > 6)
Container(
GestureDetector(
onTap: () =>
setState(() => _tagsExpanded = !_tagsExpanded),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 5),
decoration: BoxDecoration(
@@ -694,7 +699,9 @@ class _AgentCardState extends State<_AgentCard> {
color: AppColors.accentOrange, width: 0.7),
),
child: Text(
'+${specializations.length - 6} more',
_tagsExpanded
? 'Show Less'
: '+${specializations.length - 6} more',
style: const TextStyle(
fontFamily: 'SourceSerif4',
fontSize: 13,
@@ -703,6 +710,7 @@ class _AgentCardState extends State<_AgentCard> {
),
),
),
),
],
),
const SizedBox(height: 14),

View File

@@ -21,7 +21,7 @@ class SocketService {
bool _isConnected = false;
bool _intentionalDisconnect = false;
int _reconnectAttempts = 0;
static const _maxReconnectAttempts = 3;
static const _maxReconnectAttempts = 5;
String? _currentToken;
// Stream controllers for events

View File

@@ -266,7 +266,7 @@ class _ProfileSettingsTabState extends ConsumerState<ProfileSettingsTab> {
ProfileFormField(
label: isAgent ? 'Career / Agent Type' : 'Professional Title',
controller: _titleController,
enabled: !isAgent,
enabled: false,
),
const SizedBox(height: 24),
ProfileFormField(