mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
put up dialog when user picks contact that has no mobile number
This commit is contained in:
parent
622bf21308
commit
fd30b25546
2 changed files with 10 additions and 2 deletions
|
@ -1896,4 +1896,6 @@
|
|||
don\'t see a number you want.</string>
|
||||
<string name="manual_number_hint">Other number</string>
|
||||
<string name="manual_owner_name">(Entered manually)</string>
|
||||
<string name="nbs_nomobile">Contact has no mobile number.</string>
|
||||
<string name="nbs_nomobilef">Contact for %s has no mobile number.</string>
|
||||
</resources>
|
||||
|
|
|
@ -140,9 +140,9 @@ public class NBSInviteActivity extends InviteActivity {
|
|||
null,
|
||||
CommonDataKinds.Phone.CONTACT_ID + " = ?",
|
||||
new String[] { id }, null );
|
||||
|
||||
String name = "";
|
||||
while ( pc.moveToNext() ) {
|
||||
String name =
|
||||
name =
|
||||
pc.getString( pc.getColumnIndex( CommonDataKinds.
|
||||
Phone.DISPLAY_NAME));
|
||||
String number =
|
||||
|
@ -160,6 +160,12 @@ public class NBSInviteActivity extends InviteActivity {
|
|||
if ( len_before != m_phones.size() ) {
|
||||
saveState();
|
||||
rebuildList();
|
||||
} else {
|
||||
int resid = null != name && 0 < name.length()
|
||||
? R.string.nbs_nomobilef
|
||||
: R.string.nbs_nomobile;
|
||||
String msg = Utils.format( this, resid, name );
|
||||
showOKOnlyDialog( msg );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue