File tree Expand file tree Collapse file tree 1 file changed +22
-21
lines changed
src/web/Jordnaer/Features/Chat Expand file tree Collapse file tree 1 file changed +22
-21
lines changed Original file line number Diff line number Diff line change 11
11
12
12
<MudItem Class =" @MudItemClass" Style =" @MudItemStyle" xs =" 12" sm =" 12" md =" 8" lg =" 8" xl =" 8" xxl =" 8" >
13
13
14
- @if (ActiveChat is null && IsMobile is false )
14
+ @switch (ActiveChat)
15
15
{
16
- <MudStack Row Style =" margin-left: -24px;" >
17
- <MudIcon Icon =" @Icons.Material.Filled.ArrowCircleLeft" Size =" Size.Large" Color =" Color.Info" />
18
- <MudText Typo =" Typo.h5" >V ælg én at skrive med </MudText >
19
- </MudStack >
20
- return ;
16
+ case null when IsMobile :
17
+ return ;
18
+ case null when IsMobile is false :
19
+ <MudStack Row Style =" margin-left: -24px;" >
20
+ <MudIcon Icon =" @Icons.Material.Filled.ArrowCircleLeft" Size =" Size.Large" Color =" Color.Info" />
21
+ <MudText Typo =" Typo.h5" >V ælg én at skrive med </MudText >
22
+ </MudStack >
23
+ return ;
24
+ case not null when IsMobile :
25
+ <MudAppBar Dense
26
+ ToolBarClass =" justify-space-between h-100"
27
+ Color =" Color.Primary"
28
+ Elevation =" 5" >
29
+ <MudFab StartIcon =" @Icons.Material.Filled.ArrowBack"
30
+ OnClick =" BackToList"
31
+ Color =" Color.Info"
32
+ Size =" Size.Small" />
33
+ <MudText Typo =" Typo.h5" >@ActiveChat.GetDisplayName(CurrentUser.Id ! )</MudText >
34
+ </MudAppBar >
35
+ break ;
21
36
}
22
37
23
- @if (IsMobile )
24
- {
25
- <MudAppBar Dense
26
- ToolBarClass =" justify-space-between h-100"
27
- Color =" Color.Primary"
28
- Elevation =" 5" >
29
- <MudFab StartIcon =" @Icons.Material.Filled.ArrowBack"
30
- OnClick =" BackToList"
31
- Color =" Color.Info"
32
- Size =" Size.Small" />
33
- <MudText Typo =" Typo.h5" >@ActiveChat.GetDisplayName(CurrentUser.Id ! )</MudText >
34
- </MudAppBar >
35
- }
36
-
37
38
@* The elements below cannot be readonly/disabled, as it disabled the tooltips *@
38
39
<MudList Class =" chat-message-list" Padding =" false" Dense T =" RenderFragment" >
39
40
<MudSpacer />
163
164
164
165
protected override async Task OnAfterRenderAsync (bool firstRender )
165
166
{
166
- await JsRuntime .ScrollToBottomOfElement (" .chat-message-window" );
167
+ await JsRuntime .ScrollToBottomOfElement (" .chat-message-window" );
167
168
}
168
169
169
170
private void MarkMessageIfSuccessfullySentByCurrentUser ()
You can’t perform that action at this time.
0 commit comments