mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 21:09:21 +00:00
Display user note
This commit is contained in:
parent
e3c11e48b2
commit
3794eca68b
@ -49,6 +49,8 @@ class AdvancedUserInfo extends User implements LikeElement {
|
|||||||
accountImageURL: accountImageURL,
|
accountImageURL: accountImageURL,
|
||||||
customEmojies: customEmojies);
|
customEmojies: customEmojies);
|
||||||
|
|
||||||
|
bool get hasPublicNote => publicNote.isNotEmpty;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
LikesType get likeType => LikesType.USER;
|
LikesType get likeType => LikesType.USER;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import 'package:flutter_emoji/flutter_emoji.dart';
|
import 'package:comunic/utils/ui_utils.dart';
|
||||||
|
|
||||||
/// Optimized colons Emoji-parsed string
|
/// Optimized colons Emoji-parsed string
|
||||||
///
|
///
|
||||||
@ -30,7 +30,7 @@ class DisplayedString {
|
|||||||
|
|
||||||
String get parsedString {
|
String get parsedString {
|
||||||
if (_parseCache == null) {
|
if (_parseCache == null) {
|
||||||
_parseCache = EmojiParser().emojify(this._string);
|
_parseCache = parseEmojies(this._string);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _parseCache;
|
return _parseCache;
|
||||||
|
@ -12,6 +12,7 @@ import 'package:comunic/utils/account_utils.dart';
|
|||||||
import 'package:comunic/utils/conversations_utils.dart';
|
import 'package:comunic/utils/conversations_utils.dart';
|
||||||
import 'package:comunic/utils/date_utils.dart';
|
import 'package:comunic/utils/date_utils.dart';
|
||||||
import 'package:comunic/utils/intl_utils.dart';
|
import 'package:comunic/utils/intl_utils.dart';
|
||||||
|
import 'package:comunic/utils/ui_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
|
||||||
@ -150,6 +151,14 @@ class _UserPageTabletState extends State<UserPageTablet> {
|
|||||||
value: tr("Member for %t%", args: {
|
value: tr("Member for %t%", args: {
|
||||||
"t": diffTimeFromNowToStr(_userInfo.accountCreationTime)
|
"t": diffTimeFromNowToStr(_userInfo.accountCreationTime)
|
||||||
})),
|
})),
|
||||||
|
|
||||||
|
// User public note
|
||||||
|
_AboutUserEntry(
|
||||||
|
icon: Icons.note,
|
||||||
|
title: tr("Note"),
|
||||||
|
value: parseEmojies(_userInfo.publicNote),
|
||||||
|
visible: _userInfo.hasPublicNote,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -4,6 +4,7 @@ import 'package:comunic/ui/routes/full_screen_image.dart';
|
|||||||
import 'package:comunic/ui/widgets/dialogs/auto_sized_dialog_content_widget.dart';
|
import 'package:comunic/ui/widgets/dialogs/auto_sized_dialog_content_widget.dart';
|
||||||
import 'package:comunic/utils/intl_utils.dart';
|
import 'package:comunic/utils/intl_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_emoji/flutter_emoji.dart';
|
||||||
import 'package:html/parser.dart';
|
import 'package:html/parser.dart';
|
||||||
|
|
||||||
/// User interface utilities
|
/// User interface utilities
|
||||||
@ -228,3 +229,6 @@ void showAboutAppDialog(BuildContext context) {
|
|||||||
/// Apply new theme settings
|
/// Apply new theme settings
|
||||||
void applyNewThemeSettings(BuildContext context) =>
|
void applyNewThemeSettings(BuildContext context) =>
|
||||||
context.findAncestorStateOfType<ComunicApplicationState>().refresh();
|
context.findAncestorStateOfType<ComunicApplicationState>().refresh();
|
||||||
|
|
||||||
|
/// Parse emojies
|
||||||
|
String parseEmojies(String input) => EmojiParser().emojify(input);
|
||||||
|
Loading…
Reference in New Issue
Block a user