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> { class _AgentCardState extends State<_AgentCard> {
bool _bioExpanded = false; bool _bioExpanded = false;
bool _tagsExpanded = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final agent = widget.agent; final agent = widget.agent;
final specializations = agent.specializations; final specializations = agent.specializations;
final bio = agent.description; final bio = agent.description;
final matchPercent = agent.averageRating != null final matchPercent = agent.matchPercentage != null
? '${(agent.averageRating! * 20).round()}%' ? '${agent.matchPercentage}%'
: null; : null;
return Container( return Container(
@@ -679,27 +680,34 @@ class _AgentCardState extends State<_AgentCard> {
spacing: 6, spacing: 6,
runSpacing: 6, runSpacing: 6,
children: [ children: [
...specializations ...(_tagsExpanded
.take(6) ? specializations
: specializations.take(6))
.map((tag) => _buildTag(tag)), .map((tag) => _buildTag(tag)),
if (specializations.length > 6) if (specializations.length > 6)
Container( GestureDetector(
padding: const EdgeInsets.symmetric( onTap: () =>
horizontal: 10, vertical: 5), setState(() => _tagsExpanded = !_tagsExpanded),
decoration: BoxDecoration( child: Container(
borderRadius: BorderRadius.circular(20), padding: const EdgeInsets.symmetric(
color: AppColors.accentOrange horizontal: 10, vertical: 5),
.withValues(alpha: 0.1), decoration: BoxDecoration(
border: Border.all( borderRadius: BorderRadius.circular(20),
color: AppColors.accentOrange, width: 0.7), color: AppColors.accentOrange
), .withValues(alpha: 0.1),
child: Text( border: Border.all(
'+${specializations.length - 6} more', color: AppColors.accentOrange, width: 0.7),
style: const TextStyle( ),
fontFamily: 'SourceSerif4', child: Text(
fontSize: 13, _tagsExpanded
fontWeight: FontWeight.w600, ? 'Show Less'
color: AppColors.accentOrange, : '+${specializations.length - 6} more',
style: const TextStyle(
fontFamily: 'SourceSerif4',
fontSize: 13,
fontWeight: FontWeight.w600,
color: AppColors.accentOrange,
),
), ),
), ),
), ),

View File

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

View File

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