Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
path-yu committed Apr 22, 2023
1 parent b968b8b commit 9ac8158
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/common/firebase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,12 @@ Future<Map<String, dynamic>> handleChatData(
: lastMessage['type'] == 'voice'
? '[voice]'
: lastMessage['content'];
data['showAvatar'] = lastMessage['avatar'];
data['showUserName'] = lastMessage['userName'];
} else {
data['showAvatar'] =
data['isMyRequest'] ? data['targetUserPhotoURL'] : data['userPhotoURL'];
data['showUserName'] =
data['isMyRequest'] ? data['targetUserName'] : data['userName'];
}
data['showAvatar'] =
data['isMyRequest'] ? data['userPhotoURL'] : data['targetUserPhotoURL'];
data['showUserName'] =
data['isMyRequest'] ? data['userName'] : data['targetUserName'];
data['appbarTitle'] = data['targetUserName'];
data.remove('messages');
data.remove('targetMessages');
return data;
}

Expand Down

0 comments on commit 9ac8158

Please sign in to comment.