added guardian login with views for their assigned childs
This commit is contained in:
@@ -9,8 +9,8 @@ import '../api/marianumcloud/talk/room/get_room_response.dart';
|
||||
import '../api/marianumconnect/marianumconnect_endpoint.dart';
|
||||
import '../api/marianumconnect/queries/timetable_get_element_week/timetable_element_type.dart';
|
||||
import '../main.dart';
|
||||
import '../model/account_data.dart';
|
||||
import '../notification/notification_tasks.dart';
|
||||
import '../session/session_manager.dart';
|
||||
import '../share_intent/pending_share.dart';
|
||||
import '../share_intent/remote_file_ref.dart';
|
||||
import '../state/app/modules/app_modules.dart';
|
||||
@@ -374,7 +374,10 @@ class AppRoutes {
|
||||
// ChatBloc._loadChat with the freshly-fetched maxId — sending one
|
||||
// here too with the chat list's possibly-stale room.lastMessage.id
|
||||
// would race the fresh one and could regress the server cursor.
|
||||
context.read<ChatListBloc>().markRoomAsRead(room.token, room.lastMessage.id);
|
||||
context.read<ChatListBloc>().markRoomAsRead(
|
||||
room.token,
|
||||
room.lastMessage.id,
|
||||
);
|
||||
NotificationTasks.clearNotificationsForChat(room.token);
|
||||
TalkNavigator.pushSplitView(
|
||||
context,
|
||||
@@ -404,7 +407,8 @@ class AppRoutes {
|
||||
static ResolvedPendingChat? resolvePendingChat(BuildContext context) {
|
||||
final token = pendingChatToken.value;
|
||||
if (token == null) return null;
|
||||
if (!AccountData().isPopulated()) return null;
|
||||
final nextcloud = SessionManager().current?.nextcloud;
|
||||
if (nextcloud == null) return null;
|
||||
|
||||
final rooms = context.read<ChatListBloc>().state.data?.rooms;
|
||||
final room = _findRoomByToken(rooms, token);
|
||||
@@ -417,7 +421,7 @@ class AppRoutes {
|
||||
);
|
||||
return ResolvedPendingChat(
|
||||
room: room,
|
||||
selfId: AccountData().getUsername(),
|
||||
selfId: nextcloud.username,
|
||||
avatar: avatar,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user