Просмотр исходного кода

posts cache load fix, updated libs

Veloe 4 месяцев назад
Родитель
Сommit
e912f483f6

+ 1 - 1
VeloeAvaloniaKemonoPartyApp/VeloeAvaloniaKemonoPartyApp.Android/MainActivity.cs

@@ -25,7 +25,7 @@ namespace VeloeAvaloniaKemonoPartyApp.Android
             return base.CustomizeAppBuilder(builder)
                 .WithInterFont()
                 .UseSkia().With(new SkiaOptions() { MaxGpuResourceSizeBytes = 512 * 1024 * 1024 })
-                .With(new AndroidPlatformOptions() { RenderingMode = new[] { AndroidRenderingMode.Vulkan } })
+                .With(new AndroidPlatformOptions() { RenderingMode = new[] { AndroidRenderingMode.Egl } })
                 .UseReactiveUI();
         }
     }

+ 5 - 4
VeloeAvaloniaKemonoPartyApp/VeloeAvaloniaKemonoPartyApp.Android/VeloeAvaloniaKemonoPartyApp.Android.csproj

@@ -9,8 +9,9 @@
     <ApplicationDisplayVersion>1.0.0.179</ApplicationDisplayVersion>
     <AndroidPackageFormat>apk</AndroidPackageFormat>
     <AndroidEnableProfiledAot>False</AndroidEnableProfiledAot>
-    <AssemblyVersion>1.0.0.182</AssemblyVersion>
-    <FileVersion>1.0.0.182</FileVersion>
+	<RunAOTCompilation>true</RunAOTCompilation>
+    <AssemblyVersion>1.0.0.190</AssemblyVersion>
+    <FileVersion>1.0.0.190</FileVersion>
   </PropertyGroup>
 
   <ItemGroup>
@@ -20,8 +21,8 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="Avalonia.Android" Version="11.2.0-rc1" />
-    <PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.12" />
+    <PackageReference Include="Avalonia.Android" Version="11.3.0-rc1" />
+    <PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.14" />
     <PackageReference Include="Xamarin.Essentials" Version="1.8.1" />
   </ItemGroup>
 

+ 4 - 4
VeloeAvaloniaKemonoPartyApp/VeloeAvaloniaKemonoPartyApp.Desktop/VeloeAvaloniaKemonoPartyApp.Desktop.csproj

@@ -10,14 +10,14 @@
 
   <PropertyGroup>
     <ApplicationManifest>app.manifest</ApplicationManifest>
-    <AssemblyVersion>1.0.0.175</AssemblyVersion>
-    <FileVersion>1.0.0.175</FileVersion>
+    <AssemblyVersion>1.0.0.178</AssemblyVersion>
+    <FileVersion>1.0.0.178</FileVersion>
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Avalonia.Desktop" Version="11.2.0-rc1" />
+    <PackageReference Include="Avalonia.Desktop" Version="11.3.0-rc1" />
     <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
-    <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.0-rc1" />
+    <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.3.0-rc1" />
   </ItemGroup>
 
   <ItemGroup>

+ 1 - 1
VeloeAvaloniaKemonoPartyApp/VeloeAvaloniaKemonoPartyApp/Services/HttpClient.cs

@@ -69,7 +69,7 @@ namespace VeloeKemonoPartyApp.Services
 
         public async Task<IEnumerable<Post>> GetPostsList(string id, string service, int start, string search = "")
         {
-            if (_posts.Count > 0 && _postsIds.Equals(service+id, StringComparison.Ordinal))
+            if (_posts.Count > 0 && _postsIds.Equals(service+id, StringComparison.Ordinal) && start != 0)
             {
                 var result = new List<Post>();
                 for (int i = 0; i < _postsPerLoad && _posts.Count > 0; i++)

+ 11 - 11
VeloeAvaloniaKemonoPartyApp/VeloeAvaloniaKemonoPartyApp/VeloeAvaloniaKemonoPartyApp.csproj

@@ -4,8 +4,8 @@
     <Nullable>enable</Nullable>
     <LangVersion>latest</LangVersion>
     <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
-    <AssemblyVersion>1.0.0.396</AssemblyVersion>
-    <FileVersion>1.0.0.396</FileVersion>
+    <AssemblyVersion>1.0.0.404</AssemblyVersion>
+    <FileVersion>1.0.0.404</FileVersion>
   </PropertyGroup>
 
   
@@ -14,16 +14,16 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="AngleSharp" Version="1.1.2" />
-    <PackageReference Include="Avalonia" Version="11.2.0-rc1" />
-    <PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.1.4" />
-    <PackageReference Include="Avalonia.Controls.PanAndZoom" Version="11.1.0.1" />
-    <PackageReference Include="Avalonia.HtmlRenderer" Version="11.0.0" />
-    <PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.0-rc1" />
-    <PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.0-rc1" />
-    <PackageReference Include="Avalonia.ReactiveUI" Version="11.2.0-rc1" />
+    <PackageReference Include="AngleSharp" Version="1.3.0" />
+    <PackageReference Include="Avalonia" Version="11.3.0-rc1" />
+    <PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.1.5" />
+    <PackageReference Include="Avalonia.Controls.PanAndZoom" Version="11.2.0" />
+    <PackageReference Include="Avalonia.HtmlRenderer" Version="11.2.0" />
+    <PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.0-rc1" />
+    <PackageReference Include="Avalonia.Fonts.Inter" Version="11.3.0-rc1" />
+    <PackageReference Include="Avalonia.ReactiveUI" Version="11.3.0-rc1" />
     <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
-    <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
+    <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.3.0-rc1" />
     <PackageReference Include="HanumanInstitute.MvvmDialogs.Avalonia" Version="2.1.0" />
     <PackageReference Include="HanumanInstitute.MvvmDialogs.Avalonia.MessageBox" Version="2.1.0" />
     <PackageReference Include="HyperText.Avalonia" Version="2.0.0" />

+ 1 - 0
VeloeAvaloniaKemonoPartyApp/VeloeAvaloniaKemonoPartyApp/ViewModels/CreatorsViewModel.cs

@@ -37,6 +37,7 @@ namespace VeloeAvaloniaKemonoPartyApp.ViewModels
                     vm.Creator = x.Value.Creator;
 
                     await _dialogService.ShowDialogAsync(this, vm);
+                    vm.Posts.Clear();
                 }
                 catch (Exception ex)
                 {

+ 4 - 4
VeloeAvaloniaKemonoPartyApp/VeloeAvaloniaKemonoPartyApp/Views/CreatorPostsView.axaml

@@ -23,15 +23,15 @@
 					<TextBox Watermark="Search in posts..." Text="{Binding SearchText}"/>
 					<ProgressBar IsIndeterminate="True" IsVisible="{Binding IsBusy}"/>
 				</StackPanel>
-				<ItemsRepeater 
+				<ItemsControl
 					ItemsSource="{Binding Posts}"
 					Background="Transparent">
-					<ItemsRepeater.ItemTemplate>
+					<ItemsControl.ItemTemplate>
 						<DataTemplate>
 							<views:PostView/>
 						</DataTemplate>
-					</ItemsRepeater.ItemTemplate>
-				</ItemsRepeater>
+					</ItemsControl.ItemTemplate>
+				</ItemsControl>
 				<Button 
 					Command="{Binding LoadMorePosts}"
 					HorizontalContentAlignment="Center"