Merge branch 'main' of https://github.com/pangeachat/client into toolbar-selection
This commit is contained in:
commit
03befaed70
3 changed files with 16 additions and 16 deletions
|
|
@ -138,17 +138,20 @@ class ChatDetailsView extends StatelessWidget {
|
||||||
Avatar.defaultSize * 2.5,
|
Avatar.defaultSize * 2.5,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Hero(
|
// #Pangea
|
||||||
tag: controller.widget
|
// Hero animation is causing weird visual glitch
|
||||||
.embeddedCloseButton !=
|
// Probably not worth keeping
|
||||||
null
|
// child: Hero(
|
||||||
? 'embedded_content_banner'
|
// tag: controller.widget
|
||||||
: 'content_banner',
|
// .embeddedCloseButton !=
|
||||||
child: Avatar(
|
// null
|
||||||
mxContent: room.avatar,
|
// ? 'embedded_content_banner'
|
||||||
name: displayname,
|
// : 'content_banner',
|
||||||
size: Avatar.defaultSize * 2.5,
|
// Pangea#
|
||||||
),
|
child: Avatar(
|
||||||
|
mxContent: room.avatar,
|
||||||
|
name: displayname,
|
||||||
|
size: Avatar.defaultSize * 2.5,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!room.isDirectChat &&
|
if (!room.isDirectChat &&
|
||||||
|
|
|
||||||
|
|
@ -71,12 +71,11 @@ extension MessageModeExtension on MessageMode {
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case MessageMode.translation:
|
case MessageMode.translation:
|
||||||
case MessageMode.textToSpeech:
|
case MessageMode.textToSpeech:
|
||||||
case MessageMode.practiceActivity:
|
|
||||||
case MessageMode.definition:
|
case MessageMode.definition:
|
||||||
return event.messageType == MessageTypes.Text;
|
return event.messageType == MessageTypes.Text;
|
||||||
case MessageMode.speechToText:
|
case MessageMode.speechToText:
|
||||||
return event.messageType == MessageTypes.Audio;
|
return event.messageType == MessageTypes.Audio;
|
||||||
default:
|
case MessageMode.practiceActivity:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,8 +140,6 @@ class IGCTextData {
|
||||||
matches.removeAt(matchIndex);
|
matches.removeAt(matchIndex);
|
||||||
|
|
||||||
for (final match in matches) {
|
for (final match in matches) {
|
||||||
final matchOffset = match.match.offset;
|
|
||||||
final matchLength = match.match.length;
|
|
||||||
match.match.fullText = originalInput;
|
match.match.fullText = originalInput;
|
||||||
if (match.match.offset > pangeaMatch.match.offset) {
|
if (match.match.offset > pangeaMatch.match.offset) {
|
||||||
match.match.offset += replacement.length - pangeaMatch.match.length;
|
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
|
// create a pointer to the current index in the original input
|
||||||
// and iterate until the pointer has reached the end of the input
|
// and iterate until the pointer has reached the end of the input
|
||||||
int currentIndex = 0;
|
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
|
// check if the pointer is at a match, and if so, get the index of the match
|
||||||
final int matchIndex = matchRanges.indexWhere(
|
final int matchIndex = matchRanges.indexWhere(
|
||||||
(range) => currentIndex >= range[0] && currentIndex < range[1],
|
(range) => currentIndex >= range[0] && currentIndex < range[1],
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue