mirror of
https://github.com/bitwarden/mobile
synced 2025-12-11 13:53:29 +00:00
restart app after theme change
This commit is contained in:
@@ -99,7 +99,7 @@ namespace Bit.Droid
|
||||
}
|
||||
else if(message.Command == "updatedTheme")
|
||||
{
|
||||
Recreate();
|
||||
RestartApp();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -273,5 +273,15 @@ namespace Bit.Droid
|
||||
SetTheme(Resource.Style.MainTheme);
|
||||
}
|
||||
}
|
||||
|
||||
private void RestartApp()
|
||||
{
|
||||
var intent = new Intent(this, typeof(SplashActivity));
|
||||
var pendingIntent = PendingIntent.GetActivity(this, 5923650, intent, PendingIntentFlags.CancelCurrent);
|
||||
var alarmManager = GetSystemService(AlarmService) as AlarmManager;
|
||||
var triggerMs = Java.Lang.JavaSystem.CurrentTimeMillis() + 500;
|
||||
alarmManager.Set(AlarmType.Rtc, triggerMs, pendingIntent);
|
||||
Java.Lang.JavaSystem.Exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user