feat(AppVersion): Add AppVersionService for cache invalidation on version update
Build and Deploy to Production / build-and-deploy (push) Successful in 1m37s

- Add AppVersionService to check version and clear cache if needed
- Update Configuration.Protobuf package to 0.0.4 with AppVersion proto
- Integrate version check in App.razor on app initialization
This commit is contained in:
masoodafar-web
2025-12-25 18:45:01 +03:30
parent 45a291b529
commit 516da671c6
4 changed files with 166 additions and 1 deletions
+5
View File
@@ -11,10 +11,15 @@ public partial class App
{
[Inject] private ILocalStorageService LocalStorage { get; set; } = default!;
[Inject] private AuthService AuthService { get; set; } = default!;
[Inject] private AppVersionService AppVersionService { get; set; } = default!;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
// Check app version and clear cache if needed
await AppVersionService.CheckVersionAndClearCacheIfNeededAsync();
// Check for referral code in URL query parameters
var uri = Navigation.ToAbsoluteUri(Navigation.Uri);
var query = QueryHelpers.ParseQuery(uri.Query);