✏️ 🎨 Clean up the code a little, fix some minor things

pull/2/head
Alexis Drai 2 years ago
parent 0458b353bf
commit 39c384ea07

@ -1,4 +1,5 @@
namespace AMC.Model.Models {
namespace AMC.Model.Models
{
public class Song
{
public int Id { get; set; }

@ -1,6 +1,4 @@
using System.Globalization;
namespace AMC.View;
namespace AMC.View;
public partial class App : Application
{

@ -13,7 +13,7 @@
HorizontalOptions="Start" />
<Label x:Name="CategoryLabel"
FontSize="16"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}"
HorizontalOptions="StartAndExpand" />
<Image Source="icon_chevron_right.png"
WidthRequest="24"

@ -8,8 +8,8 @@ namespace AMC.View.Converters
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var (songCount, totalDuration) = (ValueTuple<int, int>)value;
var songLabel = songCount == 1 ? Strings.SongsLabelSingular : Strings.SongsLabelPlural;
var minutesLabel = totalDuration == 1 ? Strings.MinutesLabelSingular : Strings.MinutesLabelPlural;
var songLabel = int.Abs(songCount) < 2 ? Strings.SongsLabelSingular : Strings.SongsLabelPlural;
var minutesLabel = int.Abs(totalDuration) < 2 ? Strings.MinutesLabelSingular : Strings.MinutesLabelPlural;
return string.Format(
"{0} {1}, {2} {3}",
songCount,

@ -61,7 +61,7 @@
<StackLayout Margin="16">
<Border>
<Border.StrokeShape>
<RoundRectangle CornerRadius="10,10,10,10" />
<RoundRectangle CornerRadius="8,8,8,8" />
</Border.StrokeShape>
<Image
Source="{Binding CoverImage}"

Loading…
Cancel
Save