Merge pull request #65 from pangeachat/toolbar-testing

upgraded to most recent version of matrix sdk, fix for when to show r…
pull/1011/head
ggurdin 2 years ago committed by GitHub
commit 5e14f7669c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3885,5 +3885,47 @@
"enableModeration": "Enable moderation", "enableModeration": "Enable moderation",
"enableModerationDesc": "Enable automatic moderation to review messages before they are sent", "enableModerationDesc": "Enable automatic moderation to review messages before they are sent",
"conversationLanguageLevel": "What is the language level of this conversation?", "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 event.isRichMessage
// #Pangea // #Pangea
&& &&
!(pangeaMessageEvent?.showRichText(selected) ?? false) !(pangeaMessageEvent?.showRichText(
selected,
toolbarController?.highlighted ?? false,
) ??
false)
// Pangea# // Pangea#
) { ) {
var html = event.formattedText; var html = event.formattedText;
@ -266,7 +270,11 @@ class MessageContent extends StatelessWidget {
decoration: event.redacted ? TextDecoration.lineThrough : null, decoration: event.redacted ? TextDecoration.lineThrough : null,
height: 1.3, height: 1.3,
); );
if (pangeaMessageEvent?.showRichText(selected) ?? false) { if (pangeaMessageEvent?.showRichText(
selected,
toolbarController?.highlighted ?? false,
) ??
false) {
return PangeaRichText( return PangeaRichText(
style: messageTextStyle, style: messageTextStyle,
pangeaMessageEvent: pangeaMessageEvent!, pangeaMessageEvent: pangeaMessageEvent!,

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

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

@ -320,4 +320,28 @@ class MatrixLocals extends MatrixLocalizations {
@override @override
String hasKnocked(String targetName) => l10n.hasKnocked(targetName); 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" dependency: "direct main"
description: description:
name: matrix name: matrix
sha256: ae57870b14484044896a07abbc102b29cfafcfe38c382e954ba057e63196afdd sha256: "187390203f6a5a7370490b7036f2defc306fda240f8d744191d406692c128469"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.25.5" version: "0.25.8"
matrix_api_lite: matrix_api_lite:
dependency: transitive dependency: transitive
description: description:

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

Loading…
Cancel
Save