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 ### Fixed
* Podcast availability from Android
* avoid NRE in MailSender on rdv query notifications
## [1.0.8-rc29] - unstable ## [1.0.8-rc29] - unstable
### Added ### Added

View file

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

View file

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

View file

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

View file

@ -57,4 +57,6 @@ public static class Platform
/// </summary> /// </summary>
public static Func<CancellationToken, Task<CurrentLocationResult>> TryGetCurrentLocationAsync { get; set; } = public static Func<CancellationToken, Task<CurrentLocationResult>> TryGetCurrentLocationAsync { get; set; } =
_ => Task.FromResult(CurrentLocationResult.Unavailable()); _ => 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.Abstract.Models.Messaging;
using Yavsc.Api.Client; using Yavsc.Api.Client;
namespace PostIt.ViewModels; namespace PostIt.ViewModels;
public class HomePageViewModel : ViewModelBase public class HomePageViewModel : ViewModelBase
@ -86,7 +87,7 @@ public class HomePageViewModel : ViewModelBase
public IAsyncRelayCommand OpenChat { get; } public IAsyncRelayCommand OpenChat { get; }
public IAsyncRelayCommand OpenPodcasts { get; } public IAsyncRelayCommand OpenPodcasts { get; }
public bool SupportsPodcasts => OperatingSystem.IsWindows() || OperatingSystem.IsLinux(); public bool SupportsPodcasts => Platform.IsPodcastSupported;
public IAsyncRelayCommand OpenBlogs { get; } public IAsyncRelayCommand OpenBlogs { get; }
public IAsyncRelayCommand OpenProfile { get; } public IAsyncRelayCommand OpenProfile { get; }
public IAsyncRelayCommand OpenPerformerConfiguration { get; } public IAsyncRelayCommand OpenPerformerConfiguration { get; }