Skip to content

Commit c6c10a7

Browse files
committed
Tweaks home view model
1 parent 0f641bf commit c6c10a7

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

Chavah.NetCore/Models/HomeViewModel.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Security.Cryptography.X509Certificates;
34
using BitShuva.Chavah.Common;
45
using BitShuva.Chavah.Settings;
@@ -31,7 +32,7 @@ public class HomeViewModel
3132
/// <summary>
3233
/// The image to use for social media network previews of a Chavah link.
3334
/// </summary>
34-
public string? DescriptiveImageUrl { get; set; }
35+
public Uri? DescriptiveImageUrl { get; set; }
3536

3637
/// <summary>
3738
/// Whether the app is running in debug mode.
@@ -136,7 +137,7 @@ public static HomeViewModel From(
136137
if (song != null)
137138
{
138139
vm.PageTitle = $"{song.Name} by {song.Artist} on {appOptions.Title}";
139-
vm.DescriptiveImageUrl = song.AlbumArtUri?.ToString();
140+
vm.DescriptiveImageUrl = song.AlbumArtUri;
140141
vm.Song = song;
141142
vm.SongNth = song.Number.ToNumberWord();
142143
}

Chavah.NetCore/Views/Home/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@model BitShuva.Chavah.Models.HomeViewModel
22
@* Attach an image that Facebook will use if someone links to a song. *@
3-
@if (!string.IsNullOrEmpty(Model.DescriptiveImageUrl))
3+
@if (Model.DescriptiveImageUrl != null)
44
{
55
<img src="@Model.DescriptiveImageUrl" style="display:none;" />
66
}

Chavah.NetCore/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MessiahsMusicFundDisbursement.xlsx

11 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)