1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 22:39:22 +00:00

Decode HTML characters

This commit is contained in:
Pierre HUBERT 2020-04-17 14:19:38 +02:00
parent 78e75cffdb
commit 6239c10579

View File

@ -1,6 +1,7 @@
import 'package:comunic/enums/user_page_visibility.dart';
import 'package:comunic/helpers/database/database_contract.dart';
import 'package:comunic/models/cache_model.dart';
import 'package:comunic/utils/ui_utils.dart';
import 'package:meta/meta.dart';
/// Single user information
@ -32,7 +33,7 @@ class User extends CacheModel {
String get fullName => firstName + " " + lastName;
/// Get user display name
String get displayName => fullName; //TODO : support HTML characters (eg: É => é)
String get displayName => htmlDecodeCharacters(fullName);
Map<String, dynamic> toMap() {
return {
@ -53,6 +54,4 @@ class User extends CacheModel {
this.virtualDirectory = map[UserTableContract.C_VIRTUAL_DIRECTORY],
this.accountImageURL = map[UserTableContract.C_ACCOUNT_IMAGE_URL],
super.fromMap(map);
}