mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
clean up, and try to keep contacts checked while the count available
is not in excess of the number needed. Makes it easier to use early on.
This commit is contained in:
parent
6ea692d430
commit
0e4abccc41
1 changed files with 9 additions and 7 deletions
|
@ -159,7 +159,7 @@ public class SMSInviteActivity extends InviteActivity {
|
|||
|
||||
protected void clearSelected()
|
||||
{
|
||||
showConfirmThen( getString( R.string.confirm_clear ), CLEAR_ACTION );
|
||||
showConfirmThen( R.string.confirm_clear, CLEAR_ACTION );
|
||||
}
|
||||
|
||||
protected String[] listSelected()
|
||||
|
@ -241,20 +241,20 @@ public class SMSInviteActivity extends InviteActivity {
|
|||
number, name );
|
||||
showConfirmThen( msg, R.string.button_yes, USE_IMMOBILE_ACTION );
|
||||
}
|
||||
cursor.close();
|
||||
}
|
||||
cursor.close();
|
||||
} // addPhoneNumbers
|
||||
|
||||
private void rebuildList( boolean checkIfAll )
|
||||
{
|
||||
Collections.sort(m_phoneRecs,new Comparator<PhoneRec>() {
|
||||
Collections.sort( m_phoneRecs, new Comparator<PhoneRec>() {
|
||||
public int compare( PhoneRec rec1, PhoneRec rec2 ) {
|
||||
return rec1.m_name.compareTo(rec2.m_name);
|
||||
}
|
||||
});
|
||||
m_adapter = new SMSPhonesAdapter();
|
||||
setListAdapter( m_adapter );
|
||||
if ( checkIfAll && m_phoneRecs.size() == m_nMissing ) {
|
||||
if ( checkIfAll && m_phoneRecs.size() <= m_nMissing ) {
|
||||
Iterator<PhoneRec> iter = m_phoneRecs.iterator();
|
||||
while ( iter.hasNext() ) {
|
||||
iter.next().m_checked = true;
|
||||
|
@ -294,9 +294,11 @@ public class SMSInviteActivity extends InviteActivity {
|
|||
|
||||
private void addChecked( PhoneRec rec )
|
||||
{
|
||||
Iterator<PhoneRec> iter = m_phoneRecs.iterator();
|
||||
while ( iter.hasNext() ) {
|
||||
iter.next().m_checked = false;
|
||||
if ( m_nMissing <= countChecks() ) {
|
||||
Iterator<PhoneRec> iter = m_phoneRecs.iterator();
|
||||
while ( iter.hasNext() ) {
|
||||
iter.next().m_checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
rec.m_checked = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue