From 2285414d0107aba00d11fc796a16490f866b3fc9 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Tue, 26 Nov 2019 15:23:07 +0100 Subject: [PATCH] add message toast when add address to contacts list --- Classes/ContactsListView.m | 19 +++++++++++++++++++ Resources/ar.lproj/Localizable.strings | Bin 73440 -> 73686 bytes Resources/de.lproj/Localizable.strings | Bin 78900 -> 79146 bytes Resources/en.lproj/Localizable.strings | Bin 75572 -> 75818 bytes Resources/fr.lproj/Localizable.strings | Bin 78504 -> 78754 bytes Resources/ja.lproj/Localizable.strings | Bin 71610 -> 71856 bytes Resources/nl.lproj/Localizable.strings | Bin 76310 -> 76556 bytes Resources/ru.lproj/Localizable.strings | Bin 77234 -> 77480 bytes 8 files changed, 19 insertions(+) diff --git a/Classes/ContactsListView.m b/Classes/ContactsListView.m index ced8c4167..0ac1a58ea 100644 --- a/Classes/ContactsListView.m +++ b/Classes/ContactsListView.m @@ -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 { diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index 3f512529e43d9942cbd8bc6b7308d7a772e0c472..f23bad2d2b09e8feb2fde84a24267f4a6a436cc0 100644 GIT binary patch delta 139 zcmaE`m*v`imJRoQPY&3@XPwBPz>v(4&ydGZ!jK4Ll>qtq3`JnkB8F6;SP76+0MZIT fHK`2cV0jQrZ}REwlE!4{pKi#|Za?OGy% delta 18 acmcb%pXI?`mJRoQPgZ!%vH8xQUrGRI5DO6i diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index bc2695b926fa1fb422aeac5c5008120b8f876e08..2c901823dadc7b74b4bcef1e42629e53d7504010 100644 GIT binary patch delta 168 zcmdn;f@Re!mWC~iI((BC9OA1_WKdv8X2@sAV<=%r1hPti{CtKYuxJrODp0HhNGbqn u1)!Q#hH|hxh^5D%1Z3L+u@XZtke>s@5d9>W$%ks_^hRdJiT1-1hP!c+j1oDw(y diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 639ed8532da3b72f121223bab4ba4c7fafb8669d..303cb31cc8725c78ec5694d23202ad759c20222e 100644 GIT binary patch delta 112 zcmZ4Slx5L#mWC~iY&?@E9Ojwa_g73kpP`6Bfgu@4rZOZllmJNuAg#cV2V|84>3lFt zZ}R-Z^316WRg=&Dla$P7D23{I2~<_ZpbI4PfFh-n4?c;VenEhdZ95MS;~X^rQGp-? delta 16 YcmZ4VoMpvRmWC~iY&_d|85gMm06bm=@&Et; diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings index e4d61a273dd7cd7d6aa116fe2aa232451aa2219a..49908554f60cab337ce922e1f89dc9790ee1744a 100644 GIT binary patch delta 113 zcmdnBo@K*EmIYrXD{SSNob+5wJ)fb7L4hF|NTxC*GL!&G1t6`!kOyRy1L=G)OKnjx2cn7eQDa<^~FFL08|&YxZa2?llW#)m`3yx23Jl3WGL<2bp#(@O0BHq=JRqwa uNaurDdXw$