Skip to content

Commit

Permalink
only hide footer on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsPilgaard committed Aug 18, 2024
1 parent 11413df commit 4d4e7a4
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/web/Jordnaer/Pages/Chat/ChatPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,7 @@
return;
}

List<Task> tasks = [];

if (_isMobile)
{
var hideElementTask = JsRuntime.HideElement(".footer");
tasks.Add(hideElementTask);
}

var subscribeToViewportChangesTask = BrowserViewportService.SubscribeAsync(
await BrowserViewportService.SubscribeAsync(
observerId: _breakpointObserverId,
lambda: async args =>
{
Expand All @@ -82,9 +74,11 @@
}
},
fireImmediately: true);
tasks.Add(subscribeToViewportChangesTask);

await Task.WhenAll(tasks);
if (_isMobile)
{
await JsRuntime.HideElement(".footer");
}
}

protected override async Task OnInitializedAsync()
Expand Down

0 comments on commit 4d4e7a4

Please sign in to comment.