Skip to content

Commit

Permalink
Merge pull request #16 from felipebaltazar/hotfix/fix-cachefilepath
Browse files Browse the repository at this point in the history
Fix cache filepath
  • Loading branch information
felipebaltazar authored Feb 24, 2024
2 parents d25bb3c + a566451 commit 83e0d5d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Maui.ServerDrivenUI/AppBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public static MauiAppBuilder ConfigureServerDrivenUI(this MauiAppBuilder builder
builder.Services.AddEasyCaching(o =>
o.UseLiteDB(c => ConfigureDb(c, settings)));

builder.ConfigureLifecycleEvents(b =>
{
builder.ConfigureLifecycleEvents(b => {
#if IOS
b.AddiOS(iOS => iOS.FinishedLaunching((app, launchOptions) => InitServerDrivenUIService()));
#elif ANDROID
Expand All @@ -39,7 +38,7 @@ public static MauiAppBuilder ConfigureServerDrivenUI(this MauiAppBuilder builder
private static void ConfigureDb(LiteDBOptions config, ServerDrivenUISettings settings)
{
var dbFilePath = settings.CacheFilePath
?? FileSystem.Current.AppDataDirectory + "sduicache.ldb";
?? Path.Combine(FileSystem.Current.AppDataDirectory, "sduicache.ldb");

config.DBConfig = new LiteDBDBOptions {
FileName = dbFilePath,
Expand Down

0 comments on commit 83e0d5d

Please sign in to comment.