diff --git a/lib/pages/chat_details/chat_details_view.dart b/lib/pages/chat_details/chat_details_view.dart index 24db0f582..0afa56086 100644 --- a/lib/pages/chat_details/chat_details_view.dart +++ b/lib/pages/chat_details/chat_details_view.dart @@ -138,17 +138,20 @@ class ChatDetailsView extends StatelessWidget { Avatar.defaultSize * 2.5, ), ), - child: Hero( - tag: controller.widget - .embeddedCloseButton != - null - ? 'embedded_content_banner' - : 'content_banner', - child: Avatar( - mxContent: room.avatar, - name: displayname, - size: Avatar.defaultSize * 2.5, - ), + // #Pangea + // Hero animation is causing weird visual glitch + // Probably not worth keeping + // child: Hero( + // tag: controller.widget + // .embeddedCloseButton != + // null + // ? 'embedded_content_banner' + // : 'content_banner', + // Pangea# + child: Avatar( + mxContent: room.avatar, + name: displayname, + size: Avatar.defaultSize * 2.5, ), ), if (!room.isDirectChat && diff --git a/lib/pangea/enum/message_mode_enum.dart b/lib/pangea/enum/message_mode_enum.dart index 58753e5b5..11c96e10e 100644 --- a/lib/pangea/enum/message_mode_enum.dart +++ b/lib/pangea/enum/message_mode_enum.dart @@ -71,12 +71,11 @@ extension MessageModeExtension on MessageMode { switch (this) { case MessageMode.translation: case MessageMode.textToSpeech: - case MessageMode.practiceActivity: case MessageMode.definition: return event.messageType == MessageTypes.Text; case MessageMode.speechToText: return event.messageType == MessageTypes.Audio; - default: + case MessageMode.practiceActivity: return true; } } diff --git a/lib/pangea/models/igc_text_data_model.dart b/lib/pangea/models/igc_text_data_model.dart index fe052a5ec..5f32f92d1 100644 --- a/lib/pangea/models/igc_text_data_model.dart +++ b/lib/pangea/models/igc_text_data_model.dart @@ -140,8 +140,6 @@ class IGCTextData { matches.removeAt(matchIndex); for (final match in matches) { - final matchOffset = match.match.offset; - final matchLength = match.match.length; match.match.fullText = originalInput; if (match.match.offset > pangeaMatch.match.offset) { match.match.offset += replacement.length - pangeaMatch.match.length; @@ -305,7 +303,7 @@ class IGCTextData { // create a pointer to the current index in the original input // and iterate until the pointer has reached the end of the input int currentIndex = 0; - while (currentIndex < originalInput.characters.length - 1) { + while (currentIndex < originalInput.characters.length) { // check if the pointer is at a match, and if so, get the index of the match final int matchIndex = matchRanges.indexWhere( (range) => currentIndex >= range[0] && currentIndex < range[1],