Merge branch 'main' into 559-role-play-mode

pull/1384/head
ggurdin 1 year ago committed by GitHub
commit 04012481fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -328,7 +328,6 @@ class ChatController extends State<ChatPageWithRoom>
); );
} }
await Matrix.of(context).client.roomsLoading; await Matrix.of(context).client.roomsLoading;
choreographer.setRoomId(roomId);
}); });
// Pangea# // Pangea#
_tryLoadTimeline(); _tryLoadTimeline();

@ -463,7 +463,7 @@ class InputBar extends StatelessWidget {
debounceDuration: const Duration(milliseconds: 50), debounceDuration: const Duration(milliseconds: 50),
// show suggestions after 50ms idle time (default is 300) // show suggestions after 50ms idle time (default is 300)
// #Pangea // #Pangea
key: controller!.choreographer.inputLayerLinkAndKey.key, key: controller?.choreographer.inputLayerLinkAndKey.key,
// builder: (context, controller, focusNode) => TextField( // builder: (context, controller, focusNode) => TextField(
builder: (context, _, focusNode) => TextField( builder: (context, _, focusNode) => TextField(
// Pangea# // Pangea#
@ -504,11 +504,11 @@ class InputBar extends StatelessWidget {
onSubmitted!(text); onSubmitted!(text);
}, },
// #Pangea // #Pangea
style: controller?.isMaxLength ?? false style: controller?.exceededMaxLength ?? false
? const TextStyle(color: Colors.red) ? const TextStyle(color: Colors.red)
: null, : null,
onTap: () { onTap: () {
controller!.onInputTap( controller?.onInputTap(
context, context,
fNode: focusNode, fNode: focusNode,
); );

@ -42,7 +42,6 @@ class Choreographer {
bool isFetching = false; bool isFetching = false;
Timer? debounceTimer; Timer? debounceTimer;
String? _roomId;
ChoreoRecord choreoRecord = ChoreoRecord.newRecord; ChoreoRecord choreoRecord = ChoreoRecord.newRecord;
// last checked by IGC or translation // last checked by IGC or translation
String? _lastChecked; String? _lastChecked;
@ -464,10 +463,7 @@ class Choreographer {
setState(); setState();
} }
get roomId => _roomId; get roomId => chatController.roomId;
void setRoomId(String? roomId) {
_roomId = roomId ?? '';
}
bool get _useCustomInput => [ bool get _useCustomInput => [
EditType.keyboard, EditType.keyboard,

@ -1,4 +1,3 @@
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pangea/models/space_model.dart'; import 'package:fluffychat/pangea/models/space_model.dart';
import 'package:fluffychat/pangea/pages/settings_learning/settings_learning.dart'; import 'package:fluffychat/pangea/pages/settings_learning/settings_learning.dart';
import 'package:fluffychat/pangea/widgets/user_settings/country_picker_tile.dart'; import 'package:fluffychat/pangea/widgets/user_settings/country_picker_tile.dart';
@ -32,15 +31,15 @@ class SettingsLearningView extends StatelessWidget {
const SizedBox(height: 8), const SizedBox(height: 8),
const Divider(height: 1), const Divider(height: 1),
const SizedBox(height: 8), const SizedBox(height: 8),
if (controller.pangeaController.permissionsController.isUser18()) // if (controller.pangeaController.permissionsController.isUser18())
SwitchListTile.adaptive( // SwitchListTile.adaptive(
activeColor: AppConfig.activeToggleColor, // activeColor: AppConfig.activeToggleColor,
title: Text(L10n.of(context)!.publicProfileTitle), // title: Text(L10n.of(context)!.publicProfileTitle),
subtitle: Text(L10n.of(context)!.publicProfileDesc), // subtitle: Text(L10n.of(context)!.publicProfileDesc),
value: controller.pangeaController.userController.isPublic, // value: controller.pangeaController.userController.isPublic,
onChanged: (bool isPublicProfile) => // onChanged: (bool isPublicProfile) =>
controller.setPublicProfile(isPublicProfile), // controller.setPublicProfile(isPublicProfile),
), // ),
ListTile( ListTile(
subtitle: Text(L10n.of(context)!.toggleToolSettingsDescription), subtitle: Text(L10n.of(context)!.toggleToolSettingsDescription),
), ),

@ -27,7 +27,7 @@ class PangeaTextController extends TextEditingController {
} }
static const int maxLength = 1000; static const int maxLength = 1000;
bool get isMaxLength => text.length == 1000; bool get exceededMaxLength => text.length >= maxLength;
bool forceKeepOpen = false; bool forceKeepOpen = false;

Loading…
Cancel
Save