Skip to content

Commit

Permalink
feature: migrating to Airframe.Popup to Sextant.Plugin.Popup (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
RLittlesII authored May 2, 2021
1 parent 99bd576 commit a9dc943
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
<PackageReference Update="Rg.Plugins.Popup" Version="2.*" />
<PackageReference Update="Rocket.Surgery.Xamarin.Essentials" Version="0.4.*" />
<PackageReference Update="Rocket.Surgery.Xamarin.Essentials.Abstractions" Version="0.4.*" />
<PackageReference Update="RxUI.Plugins.Popup" Version="0.*" />
<PackageReference Update="Serilog.Sinks.AppCenter.Crash" Version="1.*" />
<PackageReference Update="Serilog.Sinks.Xamarin" Version="0.*" />
<PackageReference Update="Shiny.Core" Version="1.2.0.*" />
<PackageReference Update="Shiny.Locations" Version="1.2.0.*" />
<PackageReference Update="Shiny.Notifications" Version="1.2.0.*" />
<PackageReference Update="Sextant" Version="2.*" />
<PackageReference Update="Sextant.Plugins.Popup" Version="2.*" />
<PackageReference Update="Splat" Version="11.*" />
<PackageReference Update="Splat.DryIoc" Version="11.*" />
<PackageReference Update="Splat.Serilog" Version="11.*" />
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Locations/MonitorResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public MonitorResult(MonitorState state, DateTimeOffset lastChanged)
/// <summary>
/// Gets or sets the exception.
/// </summary>
public Exception Exception { get; set; }
public Exception? Exception { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the result of the request was successful.
Expand Down
3 changes: 1 addition & 2 deletions src/Popup/Popup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ReactiveUI.XamForms" />
<PackageReference Include="Rg.Plugins.Popup" />
<PackageReference Include="RxUI.Plugins.Popup" />
<PackageReference Include="Sextant.Plugins.Popup" />
</ItemGroup>

</Project>
31 changes: 25 additions & 6 deletions src/Popup/PopupPageBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using System.Reactive.Linq;
using System.Reactive.Subjects;
using ReactiveUI;
using ReactiveUI.XamForms;
using RxUI.Plugins.Popup;
using Sextant;
using Sextant.Plugins.Popup;
using Xamarin.Forms;

[assembly: XmlnsPrefix("https://schemas.rocketsurgeonsguild.com/xaml/airframe/popup", "popup")]
Expand All @@ -16,12 +16,12 @@
namespace Rocket.Surgery.Airframe.Popup
{
/// <summary>
/// Base ReactiveUI <see cref="ReactivePopupPage{TViewModel}"/>.
/// Base ReactiveUI <see cref="SextantPopupPage{TViewModel}"/>.
/// </summary>
/// <typeparam name="TViewModel">The type of the view model.</typeparam>
/// <seealso cref="ReactiveContentPage{TViewModel}" />
public abstract class PopupPageBase<TViewModel> : ReactivePopupPage<TViewModel>
where TViewModel : class, IReactiveObject
/// <seealso cref="SextantPopupPage{TViewModel}" />
public abstract class PopupPageBase<TViewModel> : SextantPopupPage<TViewModel>, IDisposable
where TViewModel : class, IReactiveObject, IViewModel
{
private readonly ISubject<Unit> _isAppearing;
private readonly ISubject<Unit> _isDisappearing;
Expand Down Expand Up @@ -56,6 +56,13 @@ protected PopupPageBase()
/// <returns>The appearing notification.</returns>
protected virtual IObservable<Unit> IsDisappearing => _isDisappearing.AsObservable();

/// <inheritdoc/>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}

/// <inheritdoc />
protected override void OnAppearing()
{
Expand Down Expand Up @@ -90,5 +97,17 @@ protected virtual void Initialize()
protected virtual void RegisterObservers()
{
}

/// <summary>
/// Disposes of the resources allocated for this instance.
/// </summary>
/// <param name="disposing">A value indicating whether or not the instance is disposing.</param>
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
ViewBindings.Dispose();
}
}
}
}
1 change: 1 addition & 0 deletions src/Synthetic/Synthetic.csproj.DotSettings
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=coffee/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=drinks/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

0 comments on commit a9dc943

Please sign in to comment.