feat: update agent match calculation, enable tag expansion in search, increase socket reconnect attempts, and disable profile title editing
This commit is contained in:
@@ -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,27 +680,34 @@ 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(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: AppColors.accentOrange
|
||||
.withValues(alpha: 0.1),
|
||||
border: Border.all(
|
||||
color: AppColors.accentOrange, width: 0.7),
|
||||
),
|
||||
child: Text(
|
||||
'+${specializations.length - 6} more',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.accentOrange,
|
||||
GestureDetector(
|
||||
onTap: () =>
|
||||
setState(() => _tagsExpanded = !_tagsExpanded),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: AppColors.accentOrange
|
||||
.withValues(alpha: 0.1),
|
||||
border: Border.all(
|
||||
color: AppColors.accentOrange, width: 0.7),
|
||||
),
|
||||
child: Text(
|
||||
_tagsExpanded
|
||||
? 'Show Less'
|
||||
: '+${specializations.length - 6} more',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.accentOrange,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user