upgraded to most recent version of matrix sdk, fix for when to show rich text

pull/1011/head
Gabby Gurdin 2 years ago
parent 9112ba9fd9
commit 887afb0247

@ -3885,5 +3885,47 @@
"enableModeration": "Enable moderation",
"enableModerationDesc": "Enable automatic moderation to review messages before they are sent",
"conversationLanguageLevel": "What is the language level of this conversation?",
"showDefinition": "Show Definition"
"showDefinition": "Show Definition",
"acceptedKeyVerification": "{sender} accepted key verification",
"@acceptedKeyVerification": {
"type": "text",
"placeholders": {
"sender": {}
}
},
"canceledKeyVerification": "{sender} canceled key verification",
"@canceledKeyVerification": {
"type": "text",
"placeholders": {
"sender": {}
}
},
"completedKeyVerification": "{sender} completed key verification",
"@completedKeyVerification": {
"type": "text",
"placeholders": {
"sender": {}
}
},
"isReadyForKeyVerification": "{sender} is ready for key verification",
"@isReadyForKeyVerification": {
"type": "text",
"placeholders": {
"sender": {}
}
},
"requestedKeyVerification": "{sender} requested key verification",
"@requestedKeyVerification": {
"type": "text",
"placeholders": {
"sender": {}
}
},
"startedKeyVerification": "{sender} started key verification",
"@startedKeyVerification": {
"type": "text",
"placeholders": {
"sender": {}
}
}
}

@ -170,7 +170,11 @@ class MessageContent extends StatelessWidget {
event.isRichMessage
// #Pangea
&&
!(pangeaMessageEvent?.showRichText(selected) ?? false)
!(pangeaMessageEvent?.showRichText(
selected,
toolbarController?.highlighted ?? false,
) ??
false)
// Pangea#
) {
var html = event.formattedText;
@ -266,7 +270,11 @@ class MessageContent extends StatelessWidget {
decoration: event.redacted ? TextDecoration.lineThrough : null,
height: 1.3,
);
if (pangeaMessageEvent?.showRichText(selected) ?? false) {
if (pangeaMessageEvent?.showRichText(
selected,
toolbarController?.highlighted ?? false,
) ??
false) {
return PangeaRichText(
style: messageTextStyle,
pangeaMessageEvent: pangeaMessageEvent!,

@ -67,7 +67,7 @@ class PangeaMessageEvent {
.firstOrNull ??
_event;
bool showRichText(bool selected) {
bool showRichText(bool selected, bool highlighted) {
if (!_isValidPangeaMessageEvent) {
return false;
}
@ -77,7 +77,7 @@ class PangeaMessageEvent {
if ([EventStatus.error, EventStatus.sending].contains(_event.status)) {
return false;
}
if (ownMessage && !selected) return false;
if (ownMessage && !selected && !highlighted) return false;
return true;
}

@ -58,6 +58,10 @@ class PangeaRichTextState extends State<PangeaRichText> {
}
String getTextSpan() {
if (_fetchingRepresentation == true) {
return widget.pangeaMessageEvent.body;
}
if (widget.pangeaMessageEvent.eventId.contains("webdebug")) {
debugger(when: kDebugMode);
}

@ -320,4 +320,28 @@ class MatrixLocals extends MatrixLocalizations {
@override
String hasKnocked(String targetName) => l10n.hasKnocked(targetName);
@override
String acceptedKeyVerification(String senderName) =>
l10n.acceptedKeyVerification(senderName);
@override
String canceledKeyVerification(String senderName) =>
l10n.canceledKeyVerification(senderName);
@override
String completedKeyVerification(String senderName) =>
l10n.completedKeyVerification(senderName);
@override
String isReadyForKeyVerification(String senderName) =>
l10n.isReadyForKeyVerification(senderName);
@override
String requestedKeyVerification(String senderName) =>
l10n.requestedKeyVerification(senderName);
@override
String startedKeyVerification(String senderName) =>
l10n.startedKeyVerification(senderName);
}

@ -1376,10 +1376,10 @@ packages:
dependency: "direct main"
description:
name: matrix
sha256: ae57870b14484044896a07abbc102b29cfafcfe38c382e954ba057e63196afdd
sha256: "187390203f6a5a7370490b7036f2defc306fda240f8d744191d406692c128469"
url: "https://pub.dev"
source: hosted
version: "0.25.5"
version: "0.25.8"
matrix_api_lite:
dependency: transitive
description:

@ -66,7 +66,7 @@ dependencies:
keyboard_shortcuts: ^0.1.4
latlong2: ^0.8.1
linkify: ^5.0.0
matrix: ^0.25.5
matrix: ^0.25.8
native_imaging: ^0.1.0
package_info_plus: ^4.0.0
pasteboard: ^0.2.0

Loading…
Cancel
Save