3988 activitycourse tweaks (#3989)
* chore: set course and activity descriptions * chore: remove redundant results button
This commit is contained in:
parent
998ffb00ed
commit
d166f40849
5 changed files with 10 additions and 37 deletions
|
|
@ -27,7 +27,6 @@ class ChatListItem extends StatelessWidget {
|
|||
final String? filter;
|
||||
// #Pangea
|
||||
final BorderRadius? borderRadius;
|
||||
final Widget? trailing;
|
||||
// Pangea#
|
||||
|
||||
const ChatListItem(
|
||||
|
|
@ -41,7 +40,6 @@ class ChatListItem extends StatelessWidget {
|
|||
super.key,
|
||||
// #Pangea
|
||||
this.borderRadius,
|
||||
this.trailing,
|
||||
// Pangea#
|
||||
});
|
||||
|
||||
|
|
@ -444,21 +442,12 @@ class ChatListItem extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
onTap: onTap,
|
||||
// #Pangea
|
||||
// trailing: onForget == null
|
||||
// ? null
|
||||
// : IconButton(
|
||||
// icon: const Icon(Icons.delete_outlined),
|
||||
// onPressed: onForget,
|
||||
// ),
|
||||
trailing: trailing ??
|
||||
(onForget == null
|
||||
? null
|
||||
: IconButton(
|
||||
icon: const Icon(Icons.delete_outlined),
|
||||
onPressed: onForget,
|
||||
)),
|
||||
// Pangea#
|
||||
trailing: onForget == null
|
||||
? null
|
||||
: IconButton(
|
||||
icon: const Icon(Icons.delete_outlined),
|
||||
onPressed: onForget,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import 'package:fluffychat/config/app_config.dart';
|
|||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/pages/chat_list/chat_list_item.dart';
|
||||
import 'package:fluffychat/pangea/activity_sessions/activity_room_extension.dart';
|
||||
import 'package:fluffychat/pangea/course_chats/activity_template_chat_list_item.dart';
|
||||
import 'package:fluffychat/pangea/course_chats/course_chats_page.dart';
|
||||
import 'package:fluffychat/pangea/course_chats/unjoined_chat_list_item.dart';
|
||||
|
|
@ -178,25 +177,6 @@ class CourseChatsView extends StatelessWidget {
|
|||
borderRadius: BorderRadius.circular(
|
||||
AppConfig.borderRadius / 2,
|
||||
),
|
||||
trailing: joinedRoom.activityIsFinished
|
||||
? SizedBox(
|
||||
height: 24.0,
|
||||
width: 54.0,
|
||||
child: ElevatedButton(
|
||||
onPressed: () =>
|
||||
controller.onChatTap(joinedRoom),
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: const EdgeInsets.all(0),
|
||||
),
|
||||
child: Text(
|
||||
L10n.of(context).results,
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
);
|
||||
}
|
||||
i -= joinedSessions.length;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ class SelectedCourseController extends State<SelectedCourse> {
|
|||
|
||||
final roomId = await client.createPangeaSpace(
|
||||
name: course.title,
|
||||
topic: course.description,
|
||||
introChatName: L10n.of(context).introductions,
|
||||
announcementsChatName: L10n.of(context).announcements,
|
||||
visibility: sdk.Visibility.private,
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ extension CoursePlanRoomExtension on Room {
|
|||
},
|
||||
visibility: sdk.Visibility.private,
|
||||
name: activity.title,
|
||||
topic: activity.description,
|
||||
initialState: [
|
||||
StateEvent(
|
||||
type: PangeaEventTypes.activityPlan,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ extension SpacesClientExtension on Client {
|
|||
required String name,
|
||||
required String introChatName,
|
||||
required String announcementsChatName,
|
||||
String? topic,
|
||||
Visibility visibility = Visibility.private,
|
||||
JoinRules joinRules = JoinRules.public,
|
||||
Uint8List? avatar,
|
||||
|
|
@ -26,6 +27,7 @@ extension SpacesClientExtension on Client {
|
|||
creationContent: {'type': RoomCreationTypes.mSpace},
|
||||
visibility: visibility,
|
||||
name: name.trim(),
|
||||
topic: topic?.trim(),
|
||||
powerLevelContentOverride: {'events_default': 100},
|
||||
initialState: [
|
||||
RoomDefaults.defaultSpacePowerLevels(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue