Skip to content

Commit 327daef

Browse files
committed
Fix various errors
1 parent 68922cd commit 327daef

22 files changed

+58
-59
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Generated\ Files/
4848
TestResult.xml
4949
nunit-*.xml
5050

51+
*.GeneratedMSBuildEditorConfig.editorconfig
52+
5153
# Build Results of an ATL Project
5254
[Dd]ebugPS/
5355
[Rr]eleasePS/

src/SocialQ.Android/Effects/LabelShadowEffect.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
using Xamarin.Forms;
66
using Xamarin.Forms.Platform.Android;
77

8-
[assembly:ResolutionGroupName ("SocialQ")]
9-
[assembly:ExportEffect (typeof(LabelShadowEffect), "LabelShadowEffect")]
8+
[assembly:ResolutionGroupName("SocialQ")]
9+
[assembly:ExportEffect(typeof(LabelShadowEffect), "LabelShadowEffect")]
10+
1011
namespace SocialQ.Droid.Effects
1112
{
1213
public class LabelShadowEffect : PlatformEffect
@@ -16,7 +17,7 @@ protected override void OnAttached()
1617
try
1718
{
1819
var control = Control as Android.Widget.TextView;
19-
var effect = (ShadowEffect) Element.Effects.FirstOrDefault(e => e is ShadowEffect);
20+
var effect = (ShadowEffect)Element.Effects.FirstOrDefault(e => e is ShadowEffect);
2021
if (effect != null)
2122
{
2223
float radius = effect.Radius;
@@ -32,7 +33,7 @@ protected override void OnAttached()
3233
}
3334
}
3435

35-
protected override void OnDetached ()
36+
protected override void OnDetached()
3637
{
3738
}
3839
}

src/SocialQ.Android/MainActivity.cs

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
1-
using System;
1+
using System;
22

33
using Android.App;
44
using Android.Content;
55
using Android.Content.PM;
6+
using Android.OS;
67
using Android.Runtime;
78
using Android.Views;
89
using Android.Widget;
9-
using Android.OS;
10+
1011
using Shiny;
12+
1113
using SocialQ.Forms;
14+
1215
using Xamarin.Forms.Auth;
1316

1417
namespace SocialQ.Droid
1518
{
1619
[Activity(Label = "SocialQ.Forms", Icon = "@mipmap/ic_launcher", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
1720
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
1821
{
22+
/// <inheritdoc/>
23+
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)
24+
{
25+
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
26+
this.ShinyRequestPermissionsResult(requestCode, permissions, grantResults);
27+
}
28+
29+
/// <inheritdoc/>
1930
protected override void OnCreate(Bundle savedInstanceState)
2031
{
2132
App.ParentWindow = this;
@@ -24,7 +35,7 @@ protected override void OnCreate(Bundle savedInstanceState)
2435

2536
base.OnCreate(savedInstanceState);
2637

27-
Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);
38+
Rg.Plugins.Popup.Popup.Init(this);
2839

2940
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
3041
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
@@ -42,13 +53,6 @@ protected override void OnNewIntent(Intent intent)
4253
this.ShinyOnNewIntent(intent);
4354
}
4455

45-
/// <inheritdoc/>
46-
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)
47-
{
48-
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
49-
this.ShinyRequestPermissionsResult(requestCode, permissions, grantResults);
50-
}
51-
5256
/// <inheritdoc/>
5357
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
5458
{

src/SocialQ.Android/MainApplication.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ namespace SocialQ.Droid
99
[Application]
1010
public class MainApplication : ShinyAndroidApplication<SocialQStartup>
1111
{
12-
public MainApplication(IntPtr handle, JniHandleOwnership transfer) : base(handle, transfer)
12+
public MainApplication(IntPtr handle, JniHandleOwnership transfer)
13+
: base(handle, transfer)
1314
{
1415
}
1516

16-
1717
public override void OnCreate()
1818
{
1919
base.OnCreate();
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.reactivemarbles.socialq">
3-
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
3+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
44
<application android:label="SocialQ.Forms.Android"></application>
5-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
6-
<!--Intent filter to capture System Browser calling back to our app after Sign In-->
7-
<activity android:name="xamarin.forms.auth.BrowserTabActivity">
8-
<intent-filter>
9-
<action android:name="android.intent.action.VIEW" />
10-
<category android:name="android.intent.category.DEFAULT" />
11-
<category android:name="android.intent.category.BROWSABLE" />
12-
<data android:scheme="https" android:host="<REDIRECT-URL>" />
13-
</intent-filter>
14-
</activity>
155
</manifest>

src/SocialQ.Android/Properties/AssemblyInfo.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using System.Reflection;
1+
using System.Reflection;
22
using System.Runtime.CompilerServices;
33
using System.Runtime.InteropServices;
44
using Android.App;
55

6-
// General Information about an assembly is controlled through the following
6+
// General Information about an assembly is controlled through the following
77
// set of attributes. Change these attribute values to modify the information
88
// associated with an assembly.
99
[assembly: AssemblyTitle("SocialQ.Forms.Android")]
@@ -19,7 +19,7 @@
1919
// Version information for an assembly consists of the following four values:
2020
//
2121
// Major Version
22-
// Minor Version
22+
// Minor Version
2323
// Build Number
2424
// Revision
2525
[assembly: AssemblyVersion("1.0.0.0")]

src/SocialQ.Android/SocialQ.Android.csproj

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -16,7 +16,7 @@
1616
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
1717
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
1818
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
19-
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
19+
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
2020
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
2121
<AndroidUseAapt2>true</AndroidUseAapt2>
2222
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
@@ -57,9 +57,13 @@
5757
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
5858
<PackageReference Include="Shiny.Core" Version="1.2.0.1755" />
5959
<PackageReference Include="SkiaSharp" Version="2.80.2" />
60-
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1687" />
60+
<PackageReference Include="ReactiveUI.XamForms" Version="13.0.38" />
61+
<PackageReference Include="Rg.Plugins.Popup" Version="2.0.0.10" />
6162
<PackageReference Include="Xamarin.Essentials" Version="1.6.0" />
6263
<PackageReference Include="Xamarin.Forms.Auth" Version="2.0.16" />
64+
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
65+
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.3" />
66+
<PackageReference Include="Xamarin.Android.Support.Collections" Version="28.0.0.3" />
6367
</ItemGroup>
6468
<ItemGroup>
6569
<Compile Include="Effects\LabelShadowEffect.cs" />
@@ -105,5 +109,5 @@
105109
<Name>SocialQ.Forms</Name>
106110
</ProjectReference>
107111
</ItemGroup>
108-
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
109-
</Project>
112+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
113+
</Project>

src/SocialQ.Forms/Profile/User.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public User()
1919

2020
var userNameChanged =
2121
this.WhenPropertyChanges(x => x.ViewModel!.UserName)
22-
.Select(x => x.value)
22+
.Select(x => x.Value)
2323
.Where(string.IsNullOrEmpty)
2424
.Select(_ => Unit.Default);
2525

src/SocialQ.Forms/Queue/QueuedItemView.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
x:Class="SocialQ.Forms.Queue.QueuedItemView"
88
x:TypeArguments="queue:QueuedItemViewModel">
99

10-
<pancakeView:PancakeView HeightRequest="180" WidthRequest="320" Margin="10" HorizontalOptions="Center" CornerRadius="25" Elevation="2" BackgroundColor="Chocolate">
10+
<pancakeView:PancakeView HeightRequest="180" WidthRequest="320" Margin="10" HorizontalOptions="Center" CornerRadius="25" BackgroundColor="Chocolate">
1111
<Grid RowSpacing="0" ColumnSpacing="0">
1212
<Image x:Name="CoffeeBackground" Aspect="AspectFill" Grid.RowSpan="4" Grid.Row="0" />
1313
<Grid.RowDefinitions>

src/SocialQ.Forms/Queue/Queues.xaml.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ public Queues()
2121
InitializeComponent();
2222

2323
this.WhenPropertyChanges(x => x.ViewModel!.Queue)
24-
.Where(x => x.value != null)
25-
.Select(x => x.value)
24+
.Where(x => x.Value != null)
25+
.Select(x => x.Value)
2626
.BindTo(this, x => x.Queue.ItemsSource)
2727
.DisposeWith(PageDisposables);
2828

2929
this.WhenPropertyChanges(x => x.ViewModel)
30-
.Where(x => x.value != null)
30+
.Where(x => x.Value != null)
3131
.Select(x => Unit.Default)
3232
.InvokeCommand(this, x => x.ViewModel!.InitializeData)
3333
.DisposeWith(PageDisposables);

src/SocialQ.Forms/SocialQ.Forms.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
<PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection" Version="10.0.1" />
2929
<PackageReference Include="Splat.Serilog" Version="10.0.1" />
3030
<PackageReference Include="System.Reactive" Version="5.0.0" />
31-
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1687" />
3231
<PackageReference Include="Xamarin.Essentials" Version="1.6.0" />
3332
<PackageReference Include="Xamarin.Forms.PancakeView" Version="2.3.0.759" />
3433
<PackageReference Include="XF.Material" Version="1.7.7" />
34+
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1821" />
3535
</ItemGroup>
3636

3737
<ItemGroup>

src/SocialQ.Forms/Stores/StoreCardView.xaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
WidthRequest="320"
1313
Margin="10"
1414
HorizontalOptions="Center"
15-
CornerRadius="25"
16-
Elevation="2"
15+
CornerRadius="25"
1716
BackgroundColor="{TemplateBinding StoreColor}">
1817
<Grid
1918
RowSpacing="0"

src/SocialQ.Forms/Stores/StoreDetail.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public StoreDetail()
1919
InitializeComponent();
2020

2121
this.WhenPropertyChanges(x => x.ViewModel!.StoreId)
22-
.Select(x => x.value)
22+
.Select(x => x.Value)
2323
.Where(x => x != Guid.Empty)
2424
.InvokeCommand(this, x => x.ViewModel!.InitializeData)
2525
.DisposeWith(PageDisposables);

src/SocialQ.Forms/Stores/StoreSearch.xaml.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ public StoreSearch()
2525
.DisposeWith(PageDisposables);
2626

2727
this.WhenPropertyChanges(x => x.ViewModel)
28-
.Where(x => x.value != null)
28+
.Where(x => x.Value != null)
2929
.Select(x => Unit.Default)
3030
.InvokeCommand(this, x => x.ViewModel!.InitializeData)
3131
.DisposeWith(PageDisposables);
3232

3333
this.WhenPropertyChanges(x => x.ViewModel!.Stores)
34-
.Where(x => x.value != null)
35-
.Select(x => x.value)
34+
.Where(x => x.Value != null)
35+
.Select(x => x.Value)
3636
.BindTo(this, x => x.StoreList.ItemsSource)
3737
.DisposeWith(PageDisposables);
3838

3939
this.WhenPropertyChanges(x => x.ViewModel!.StoreCategories)
40-
.Where(x => x.value != null)
41-
.Select(x => x.value)
40+
.Where(x => x.Value != null)
41+
.Select(x => x.Value)
4242
.BindTo(this, x => x.Categories.ItemsSource)
4343
.DisposeWith(PageDisposables);
4444

src/SocialQ.UnitTests/Stores/StoreServiceFixture.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public StoreServiceFixture()
1818
.Returns(Observable.Return(new List<StoreDto> { StoreDto.Default }));
1919
}
2020

21-
public StoreServiceFixture WithClient(IStoreApiClient client) => this.With(ref _client, client);
21+
public StoreServiceFixture WithClient(IStoreApiClient client) => this.With(out _client, client);
2222

2323
public static implicit operator StoreService(StoreServiceFixture fixture) => fixture.Build();
2424

src/SocialQ.iOS/SocialQ.iOS.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@
129129
<PackageReference Include="Sextant" Version="2.9.5" />
130130
<PackageReference Include="Shiny.Core" Version="1.2.0.1755" />
131131
<PackageReference Include="SkiaSharp" Version="2.80.2" />
132-
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1687" />
133132
<PackageReference Include="Xamarin.Essentials" Version="1.6.0" />
134-
<PackageReference Include="Xamarin.Forms.Auth" Version="2.0.16" />
133+
<PackageReference Include="ReactiveUI.XamForms" Version="13.0.38" />
134+
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
135135
</ItemGroup>
136136
<ItemGroup>
137137
<ProjectReference Include="..\SocialQ.Forms\SocialQ.Forms.csproj">

src/SocialQ/CachingFunctions.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public static IObservable<IChangeSet<TSource, TKey>> CacheChangeSet<TSource, TKe
3232
string cacheKey,
3333
IBlobCache? blobCache = null,
3434
IFullLogger? log = default)
35+
where TKey : notnull
3536
{
3637
if (source == null)
3738
{
@@ -70,7 +71,6 @@ public static IObservable<IChangeSet<TSource, TKey>> CacheChangeSet<TSource, TKe
7071
/// <param name="cacheKey">The cache key.</param>
7172
/// <param name="blobCache">The cache.</param>
7273
/// <param name="logger">The logger.</param>
73-
/// <param name="scheduler">The scheduler.</param>
7474
/// <param name="forceUpdate">Force an update.</param>
7575
/// <param name="expiration">The expiration.</param>
7676
/// <typeparam name="T">The observable type.</typeparam>
@@ -80,7 +80,6 @@ public static IObservable<T> CacheApiResult<T>(
8080
string cacheKey,
8181
IBlobCache blobCache,
8282
IFullLogger? logger = null,
83-
IScheduler? scheduler = null,
8483
bool forceUpdate = false,
8584
TimeSpan expiration = default)
8685
{

src/SocialQ/IHubClient.cs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public interface IHubClient<out T>
1919
/// Invokes a method with the provided name.
2020
/// </summary>
2121
/// <param name="methodName">The method name.</param>
22-
/// <typeparam name="T">The return type.</typeparam>
2322
/// <returns>A completion value.</returns>
2423
IObservable<T> Invoke(string methodName);
2524
}

src/SocialQ/Profile/UserViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public UserViewModel(IPopupViewStackService popupViewStackService, ISettings set
2525
{
2626
settings
2727
.WhenPropertyChanges(x => x.UserName)
28-
.Select(x => x.value)
28+
.Select(x => x.Value)
2929
.ToProperty(this, nameof(UserName), string.Empty)
3030
.DisposeWith(Subscriptions);
3131

src/SocialQ/Queue/QueuedItemViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public QueuedItemViewModel(QueuedStoreDto dto)
2222
RemainingQueueTime = dto.RemainingQueueTime;
2323

2424
this.WhenPropertyChanges(x => x.RemainingQueueTime)
25-
.Select(x => x.value)
25+
.Select(x => x.Value)
2626
.RemainingTime(RxApp.TaskpoolScheduler)
2727
.ObserveOn(RxApp.MainThreadScheduler)
2828
.ToProperty(this, nameof(CurrentQueueTime), dto.RemainingQueueTime.TimeOfDay - DateTimeOffset.Now.TimeOfDay);

src/SocialQ/SocialQ.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
<PackageReference Include="ReactiveMarbles.PropertyChanged" Version="1.4.1" />
1616
<PackageReference Include="ReactiveUI" Version="13.0.38" />
1717
<PackageReference Include="ReactiveUI.Fody" Version="13.0.38" />
18+
<PackageReference Include="ReactiveUI.XamForms" Version="13.0.38" />
19+
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1821" />
1820
<PackageReference Include="refit" Version="5.2.4" />
1921
<PackageReference Include="Rg.Plugins.Popup" Version="2.0.0.10" />
2022
<PackageReference Include="Sextant.Plugins.Popup" Version="2.9.5" />
2123
<PackageReference Include="Shiny.Core" Version="1.2.0.1755" />
2224
<PackageReference Include="Shiny.Notifications" Version="1.2.0.1755" />
2325
<PackageReference Include="Splat.Serilog" Version="10.0.1" />
24-
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1687" />
2526
<PackageReference Include="Xamarin.Forms.Auth" Version="2.0.16" />
2627
</ItemGroup>
2728

src/SocialQ/Stores/StoreDetailViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public StoreDetailViewModel(
4444
ReactiveCommand.CreateFromObservable<Guid, Unit>(ExecuteGetStore);
4545

4646
this.WhenPropertyChanges(x => x.StoreId)
47-
.Select(x => x.value)
47+
.Select(x => x.Value)
4848
.Where(x => x != Guid.Empty)
4949
.DistinctUntilChanged()
5050
.InvokeCommand(getStore)

0 commit comments

Comments
 (0)