private async void HandleSaveSettingsCommand() { IsLoading = true; var settings = new PhotoFrameSettings(Address, UserName, Password); settings.UseHttps = UseHttps; settings.UseSmartAlbum = UseSmartAlbum; if (UseSmartAlbum) { var album = SelectedSmartAlbum as Smart_Album; settings.AlbumName = album?.name; settings.AlbumId = album?.id; } else { var album = SelectedAlbum as AlbumItem; settings.AlbumName = album?.info?.name; settings.AlbumId = album?.id; } await settingsHelper.SaveAsync(settings); IsLoading = false; navigationService.GoBack(); }