Merge branch 'main' into handles-stand-out
This commit is contained in:
commit
4dd2ef1f90
5 changed files with 512 additions and 461 deletions
|
|
@ -3948,15 +3948,6 @@
|
|||
"roomDataMissing": "Some data may be missing from rooms in which you are not a member.",
|
||||
"updatePhoneOS": "You may need to update your device's OS version.",
|
||||
"wordsPerMinute": "Words per minute",
|
||||
"roomCapacity": "Room Capacity",
|
||||
"roomFull": "This room is already at capacity.",
|
||||
"topicNotSet": "The topic has not been set.",
|
||||
"capacityNotSet": "This room has no capacity limit.",
|
||||
"roomCapacityHasBeenChanged": "Room capacity changed",
|
||||
"roomExceedsCapacity": "Room exceeds capacity. Consider removing students from the room, or raising the capacity.",
|
||||
"capacitySetTooLow": "Room capacity cannot be set below the current number of non-admins.",
|
||||
"roomCapacityExplanation": "Room capacity limits the number of non-admins allowed in a room.",
|
||||
"enterNumber": "Please enter a whole number value.",
|
||||
"autoIGCToolName": "Run Language Assistance Automatically",
|
||||
"autoIGCToolDescription": "Automatically run language assistance after typing messages",
|
||||
"runGrammarCorrection": "Run grammar correction",
|
||||
|
|
@ -3969,5 +3960,15 @@
|
|||
"tooltipInstructionsTitle": "Not sure what that does?",
|
||||
"tooltipInstructionsMobileBody": "Press and hold items to view tooltips.",
|
||||
"tooltipInstructionsBrowserBody": "Hover over items to view tooltips.",
|
||||
"addSpaceToSpaceDescription": "Select a space to add as a parent",
|
||||
"roomCapacity": "Room Capacity",
|
||||
"roomFull": "This room is already at capacity.",
|
||||
"topicNotSet": "The topic has not been set.",
|
||||
"capacityNotSet": "This room has no capacity limit.",
|
||||
"roomCapacityHasBeenChanged": "Room capacity changed",
|
||||
"roomExceedsCapacity": "Room exceeds capacity. Consider removing students from the room, or raising the capacity.",
|
||||
"capacitySetTooLow": "Room capacity cannot be set below the current number of non-admins.",
|
||||
"roomCapacityExplanation": "Room capacity limits the number of non-admins allowed in a room.",
|
||||
"enterNumber": "Please enter a whole number value.",
|
||||
"buildTranslation": "Build your translation from the choices above"
|
||||
}
|
||||
|
|
@ -16,7 +16,6 @@ import 'package:fluffychat/pangea/utils/error_handler.dart';
|
|||
import 'package:fluffychat/pangea/utils/firebase_analytics.dart';
|
||||
import 'package:fluffychat/pangea/widgets/subscription/subscription_snackbar.dart';
|
||||
import 'package:fluffychat/utils/localized_exception_extension.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/utils/tor_stub.dart'
|
||||
if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart';
|
||||
|
|
@ -801,7 +800,10 @@ class ChatListController extends State<ChatList>
|
|||
final selectedSpace = await showConfirmationDialog<String>(
|
||||
context: context,
|
||||
title: L10n.of(context)!.addToSpace,
|
||||
message: L10n.of(context)!.addToSpaceDescription,
|
||||
// #Pangea
|
||||
// message: L10n.of(context)!.addToSpaceDescription,
|
||||
message: L10n.of(context)!.addSpaceToSpaceDescription,
|
||||
// Pangea#
|
||||
fullyCapitalizedForMaterial: false,
|
||||
actions: Matrix.of(context)
|
||||
.client
|
||||
|
|
@ -820,8 +822,11 @@ class ChatListController extends State<ChatList>
|
|||
.map(
|
||||
(space) => AlertDialogAction(
|
||||
key: space.id,
|
||||
label: space
|
||||
.getLocalizedDisplayname(MatrixLocals(L10n.of(context)!)),
|
||||
// #Pangea
|
||||
// label: space
|
||||
// .getLocalizedDisplayname(MatrixLocals(L10n.of(context)!)),
|
||||
label: space.nameIncludingParents(context),
|
||||
// Pangea#
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
|
|
|
|||
|
|
@ -95,6 +95,24 @@ extension ChildrenAndParentsRoomExtension on Room {
|
|||
)
|
||||
.toList();
|
||||
|
||||
String _nameIncludingParents(BuildContext context) {
|
||||
String nameSoFar = getLocalizedDisplayname(MatrixLocals(L10n.of(context)!));
|
||||
Room currentRoom = this;
|
||||
if (currentRoom.immediateClassParents.isEmpty) {
|
||||
return nameSoFar;
|
||||
}
|
||||
currentRoom = currentRoom.immediateClassParents.first;
|
||||
var nameToAdd =
|
||||
currentRoom.getLocalizedDisplayname(MatrixLocals(L10n.of(context)!));
|
||||
nameToAdd =
|
||||
nameToAdd.length <= 10 ? nameToAdd : "${nameToAdd.substring(0, 10)}...";
|
||||
nameSoFar = '$nameToAdd > $nameSoFar';
|
||||
if (currentRoom.immediateClassParents.isEmpty) {
|
||||
return nameSoFar;
|
||||
}
|
||||
return "... > $nameSoFar";
|
||||
}
|
||||
|
||||
// gets all space children of a given space, down the
|
||||
// space tree.
|
||||
List<String> get _allSpaceChildRoomIds {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import 'package:fluffychat/pangea/models/class_model.dart';
|
|||
import 'package:fluffychat/pangea/models/tokens_event_content_model.dart';
|
||||
import 'package:fluffychat/pangea/utils/bot_name.dart';
|
||||
import 'package:fluffychat/pangea/utils/error_handler.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -66,7 +67,6 @@ extension PangeaRoom on Room {
|
|||
Future<void> inviteTeachersToAnalyticsRoom() async =>
|
||||
await _inviteTeachersToAnalyticsRoom();
|
||||
|
||||
// Invite teachers of 1 space to all users' analytics rooms
|
||||
Future<void> inviteSpaceTeachersToAnalyticsRooms() async =>
|
||||
await _inviteSpaceTeachersToAnalyticsRooms();
|
||||
|
||||
|
|
@ -109,6 +109,9 @@ extension PangeaRoom on Room {
|
|||
|
||||
List<Room> get pangeaSpaceParents => _pangeaSpaceParents;
|
||||
|
||||
String nameIncludingParents(BuildContext context) =>
|
||||
_nameIncludingParents(context);
|
||||
|
||||
List<String> get allSpaceChildRoomIds => _allSpaceChildRoomIds;
|
||||
|
||||
// class_and_exchange_settings
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue