diff --git a/BookAStar/BookAStar/Helpers/UserHelpers.cs b/BookAStar/BookAStar/Helpers/UserHelpers.cs index e3344fc2..d98a436f 100644 --- a/BookAStar/BookAStar/Helpers/UserHelpers.cs +++ b/BookAStar/BookAStar/Helpers/UserHelpers.cs @@ -21,6 +21,20 @@ namespace BookAStar.Helpers return result; } + public static ImageSource SmallAvatar(string avatarPath, string username) + { + return avatarPath == null ? + ImageSource.FromResource("BookAStar.Images.Users.icon_user.png") : + ImageSource.FromUri(new Uri($"{Constants.YavscHomeUrl}/Avatars/{username}.s.png")); + } + + public static ImageSource ExtraSmallAvatar(string avatarPath, string username) + { + return avatarPath == null ? + ImageSource.FromResource("BookAStar.Images.Users.icon_user.png") : + ImageSource.FromUri(new Uri($"{Constants.YavscHomeUrl}/Avatars/{username}.xs.png")); + } + public static HttpClient CreateJsonClient() { return CreateJsonClient(MainSettings.CurrentUser.YavscTokens.AccessToken); @@ -36,8 +50,6 @@ namespace BookAStar.Helpers return client; } - - /// /// Uploads the given stream to /// /api/fs, in order to be saved under the given file name diff --git a/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml b/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml index f0478691..968ed222 100644 --- a/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml +++ b/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml @@ -30,29 +30,34 @@ - + ItemsSource="{Binding Queries}" x:Name="list" ItemTapped="OnViewDetail" HasUnevenRows="true" + SeparatorVisibility="Default" SeparatorColor="Black"> + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml.cs b/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml.cs index 56febae2..3cfb96f4 100644 --- a/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml.cs +++ b/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml.cs @@ -26,8 +26,8 @@ namespace BookAStar.Pages private void OnViewDetail(object sender, ItemTappedEventArgs e) { - BookQueryData data = e.Item as BookQueryData; - App.NavigationService.NavigateTo(true,data); + var item = e.Item as BookQueryViewModel; + App.NavigationService.NavigateTo(true,item); } } } diff --git a/BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml b/BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml index 819bdb67..fa6e5825 100644 --- a/BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml +++ b/BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml @@ -19,20 +19,24 @@ - + -