Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharykeeping committed Oct 18, 2024
1 parent 37df4c8 commit 771c369
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
20 changes: 5 additions & 15 deletions src/MobileUI/Controls/ProfileActivity.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,27 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:SSW.Rewards.Mobile.Controls"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="SSW.Rewards.Mobile.Controls.ProfileActivity">
<VerticalStackLayout>
<VerticalStackLayout >
<Label Text="Last Seen"
FontSize="16"
Style="{StaticResource LabelBold}"
Margin="0, 5" />

<ActivityIndicator
HorizontalOptions="Center"
VerticalOptions="Center"
IsRunning="True"
Color="{StaticResource primary}"
IsVisible="{Binding IsLoading}" />

<VerticalStackLayout
BindableLayout.ItemsSource="{Binding LastSeen}"
Margin="0,0,0,10"
Spacing="8">
<BindableLayout.ItemTemplate>
<DataTemplate>
<controls:ProfileActivityItem/>
<controls:ProfileActivityItem />
</DataTemplate>
</BindableLayout.ItemTemplate>
<BindableLayout.EmptyView>
<Label Text="No check-ins"
TextColor="{StaticResource LeaderCardBackground}"
Margin="0, 10"
HorizontalOptions="Center"
IsVisible="{Binding IsLoading, Converter={toolkit:InvertedBoolConverter}}"/>
HorizontalOptions="Center" />
</BindableLayout.EmptyView>
</VerticalStackLayout>

Expand All @@ -51,15 +42,14 @@
Spacing="8">
<BindableLayout.ItemTemplate>
<DataTemplate>
<controls:ProfileActivityItem/>
<controls:ProfileActivityItem />
</DataTemplate>
</BindableLayout.ItemTemplate>
<BindableLayout.EmptyView>
<Label Text="No recent activity"
TextColor="{StaticResource LeaderCardBackground}"
Margin="0, 10"
HorizontalOptions="Center"
IsVisible="{Binding IsLoading, Converter={toolkit:InvertedBoolConverter}}"/>
HorizontalOptions="Center" />
</BindableLayout.EmptyView>
</VerticalStackLayout>
</VerticalStackLayout>
Expand Down
4 changes: 2 additions & 2 deletions src/MobileUI/Features/Profile/ProfileViewModelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ protected async Task LoadProfileSections()
IsStaff = profile.IsStaff;
UserEmail = profile.Email;
Title = GetTitle();


await UpdateSkillsSectionIfRequired();
UpdateLastSeenSection(profile.Achievements);
UpdateRecentActivitySection(profile.Achievements, profile.Rewards);
await UpdateSkillsSectionIfRequired();

_loadingProfileSectionsSemaphore.Release();
IsLoading = false;
Expand Down

0 comments on commit 771c369

Please sign in to comment.