Podcast from Android
Some checks failed
Dotnet build and test / build (push) Failing after 12m53s
Forgejo Release / release (push) Successful in 7m47s

This commit is contained in:
Paul Schneider 2026-10-21 12:24:11 +01:00
commit 9c0c60ebe7
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
6 changed files with 17 additions and 2 deletions

View file

@ -8,6 +8,9 @@
### Fixed
* Podcast availability from Android
* avoid NRE in MailSender on rdv query notifications
## [1.0.8-rc29] - unstable
### Added

View file

@ -9,6 +9,7 @@ using Microsoft.Extensions.DependencyInjection;
using Avalonia.Controls;
using Avalonia.Styling;
using Yavsc.Api.Client;
using PostIt.Services;
[assembly: UsesPermission(Manifest.Permission.AccessFineLocation)]
[assembly: UsesPermission(Manifest.Permission.AccessCoarseLocation)]
@ -20,6 +21,7 @@ namespace PostIt.Android
{
protected Application(nint javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
{
Platform.IsPodcastSupported = true;
}
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)

View file

@ -2,15 +2,21 @@
using Avalonia;
using Avalonia.Browser;
using PostIt;
using PostIt.Services;
internal sealed partial class Program
{
private static Task Main(string[] args) => BuildAvaloniaApp()
private static Task Main(string[] args)
{
Platform.IsPodcastSupported = false;
return BuildAvaloniaApp()
.WithInterFont()
#if DEBUG
.WithDeveloperTools()
#endif
.StartBrowserAppAsync("out");
}
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>();

View file

@ -13,6 +13,7 @@ sealed class Program
[STAThread]
public static void Main(string[] args)
{
Platform.IsPodcastSupported = true;
CLIOptionHandler.HandleArgs(args);
// Short-circuit 2nd-instance launches (OS handing us the

View file

@ -57,4 +57,6 @@ public static class Platform
/// </summary>
public static Func<CancellationToken, Task<CurrentLocationResult>> TryGetCurrentLocationAsync { get; set; } =
_ => Task.FromResult(CurrentLocationResult.Unavailable());
public static bool IsPodcastSupported { get; set; } = false;
}

View file

@ -12,6 +12,7 @@ using PostIt.ViewModels.Chat;
using Yavsc.Abstract.Models.Messaging;
using Yavsc.Api.Client;
namespace PostIt.ViewModels;
public class HomePageViewModel : ViewModelBase
@ -86,7 +87,7 @@ public class HomePageViewModel : ViewModelBase
public IAsyncRelayCommand OpenChat { get; }
public IAsyncRelayCommand OpenPodcasts { get; }
public bool SupportsPodcasts => OperatingSystem.IsWindows() || OperatingSystem.IsLinux();
public bool SupportsPodcasts => Platform.IsPodcastSupported;
public IAsyncRelayCommand OpenBlogs { get; }
public IAsyncRelayCommand OpenProfile { get; }
public IAsyncRelayCommand OpenPerformerConfiguration { get; }