mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
More clean up
This commit is contained in:
parent
f4ef4eeea9
commit
5ad49c03a3
@ -344,7 +344,7 @@ class MatrixState extends State<Matrix> {
|
||||
@override
|
||||
void initState() {
|
||||
if (widget.client == null) {
|
||||
client = Client(widget.clientName, debug: true);
|
||||
client = Client(widget.clientName, debug: false);
|
||||
if (!kIsWeb) {
|
||||
_initWithStore();
|
||||
} else {
|
||||
|
@ -14,7 +14,7 @@ extension LocalizedBody on Event {
|
||||
getLocalizedBody(BuildContext context,
|
||||
{bool withSenderNamePrefix = false, hideQuotes = false}) {
|
||||
if (this.redacted) {
|
||||
return "Redacted by ${this.redactedBecause.sender.calcDisplayname()}";
|
||||
return "Removed by ${this.redactedBecause.sender.calcDisplayname()}";
|
||||
}
|
||||
String localizedBody = body;
|
||||
final String senderName = this.sender.calcDisplayname();
|
||||
@ -214,8 +214,11 @@ extension LocalizedBody on Event {
|
||||
|
||||
// Hide quotes
|
||||
if (hideQuotes) {
|
||||
print("+++ Hide quites +++");
|
||||
List<String> lines = localizedBody.split("\n");
|
||||
print("Lines with quotes: ${lines.length}");
|
||||
lines.removeWhere((s) => s.startsWith("> "));
|
||||
print("Lines without quotes: ${lines.length}");
|
||||
localizedBody = lines.join("\n");
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ class _SettingsState extends State<Settings> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Client client = Matrix.of(context).client;
|
||||
profileFuture ??= client.getProfileFromUserId(client.userID);
|
||||
profileFuture ??= client.ownProfile;
|
||||
profileFuture.then((p) {
|
||||
if (mounted) setState(() => profile = p);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user