public static void DeleteContactAsync(IStateService stateService, TLInt userId) { #if WP8 Telegram.Api.Helpers.Execute.BeginOnThreadPool(() => stateService.GetNotifySettingsAsync( async settings => { if (settings.PeopleHub) { var store = await ContactStore.CreateOrOpenAsync(); var phoneContact = await store.FindContactByRemoteIdAsync(userId.ToString()); await store.DeleteContactAsync(phoneContact.Id); } })); #endif }