private async void Login() { await ViewModel.Login(); if (!Intent.ContainsKey("api")) { Intent["api"] = Singleton <ExApi> .Instance; } StartActivity <GalleryActivity>(intent: Intent); Finish(); }
protected internal override void OnCreate(object parameter) { base.OnCreate(parameter); if (!Intent.ContainsKey("api")) { Intent.Add("api", Singleton <EHApi> .Instance); } var api = Intent.TryGet("api") as EHApi; if (parameter is EHGalleryTag tag) { ViewModel = new GalleryViewModel(api, tag); } else if (parameter is string link) { ViewModel = new GalleryViewModel(api, Intent.TryGet("title") as string, link); } else { ViewModel = new GalleryViewModel(api); } }