mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
add message toast when add address to contacts list
This commit is contained in:
parent
37eb749a58
commit
2285414d01
8 changed files with 19 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ static NSString *sAddAddress = nil;
|
|||
static NSString *sSipFilter = nil;
|
||||
static BOOL sEnableEmailFilter = FALSE;
|
||||
static NSString *sNameOrEmailFilter;
|
||||
static BOOL addAddressFromOthers = FALSE;
|
||||
|
||||
+ (void)setSelectionMode:(ContactSelectionMode)selectionMode {
|
||||
sSelectionMode = selectionMode;
|
||||
|
|
@ -37,6 +38,7 @@ static NSString *sNameOrEmailFilter;
|
|||
|
||||
+ (void)setAddAddress:(NSString *)address {
|
||||
sAddAddress = address;
|
||||
addAddressFromOthers = true;
|
||||
}
|
||||
|
||||
+ (NSString *)getAddAddress {
|
||||
|
|
@ -155,6 +157,23 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[self presentViewController:errView animated:YES completion:nil];
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
}
|
||||
|
||||
// show message toast when add contact from address
|
||||
if ([ContactSelection getAddAddress] != nil && addAddressFromOthers) {
|
||||
UIAlertController *infoView = [UIAlertController
|
||||
alertControllerWithTitle:NSLocalizedString(@"Info", nil)
|
||||
message:NSLocalizedString(@"Select a contact or create a new one.",nil)
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction *defaultAction = [UIAlertAction actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action){
|
||||
}];
|
||||
|
||||
[infoView addAction:defaultAction];
|
||||
addAddressFromOthers = FALSE;
|
||||
[PhoneMainView.instance presentViewController:infoView animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) viewWillDisappear:(BOOL)animated {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue