Skip to content

Commit

Permalink
Fix: Username is not honoured while skip preview is true (#1807)
Browse files Browse the repository at this point in the history
  • Loading branch information
Decoder07 authored Aug 1, 2024
1 parent df5690c commit ea8e62a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion packages/hms_room_kit/lib/src/preview_meeting_flow.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class _PreviewMeetingFlowState extends State<PreviewMeetingFlow> {
Widget build(BuildContext context) {
return HMSRoomLayout.skipPreview
? MeetingScreenController(
user: widget.prebuiltOptions?.userId ?? "",
user: widget.prebuiltOptions?.userName ??
widget.prebuiltOptions?.userId ??
"",
localPeerNetworkQuality: null,
options: widget.prebuiltOptions,
tokenData: widget.tokenData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ class ChangeRoleBottomSheetState extends State<ChangeRoleBottomSheet> {
child: HMSDropDown(
dropDownItems: <DropdownMenuItem>[
...widget.roles
.where((role) => ((role.name != widget.peer.role.name) && (role.name != '__internal_recorder')))
.where((role) => ((role.name != widget.peer.role.name) &&
(role.name != '__internal_recorder')))
.sortedBy((element) => element.priority.toString())
.map((role) => DropdownMenuItem(
value: role,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ class _RemotePeerBottomSheetState extends State<RemotePeerBottomSheet> {
? HMSThemeColors.onSurfaceLowEmphasis
: HMSThemeColors.onSurfaceHighEmphasis)),
if ((widget.meetingStore.localPeer?.role.permissions
.changeRole ??
false) && (widget.meetingStore.roles.length > 1))
.changeRole ??
false) &&
(widget.meetingStore.roles.length > 1))
ListTile(
horizontalTitleGap: 2,
onTap: () async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ class MessageContainer extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.end,
children: [
HMSSubtitleText(
text: message.time == null
? ""
: formatter.format(message.time!),
text: formatter.format(message.time),
textColor: HMSThemeColors.onSurfaceMediumEmphasis,
),
const SizedBox(
Expand Down

0 comments on commit ea8e62a

Please sign in to comment.