Podcast from Android
This commit is contained in:
parent
0e9f61bd24
commit
9c0c60ebe7
6 changed files with 17 additions and 2 deletions
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
### Fixed
|
||||
|
||||
* Podcast availability from Android
|
||||
* avoid NRE in MailSender on rdv query notifications
|
||||
|
||||
## [1.0.8-rc29] - unstable
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue