mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 13:58:40 +00:00
group action conversation items, tweaks to single contact selection
This commit is contained in:
@@ -102,7 +102,6 @@ public class ContactAccessor {
|
||||
try {
|
||||
if (lookupCursor != null && lookupCursor.moveToFirst()) {
|
||||
cursor.addRow(new Object[]{lookupCursor.getLong(0), lookupCursor.getString(1), 1});
|
||||
Log.w("poop", "Adding matrix row for " + lookupCursor.getLong(0) + " : " + lookupCursor.getString(1));
|
||||
}
|
||||
} finally {
|
||||
if (lookupCursor != null)
|
||||
@@ -414,14 +413,13 @@ public class ContactAccessor {
|
||||
|
||||
if (RecipientsAdapter.usefulAsDigits(cons)) {
|
||||
phone = PhoneNumberUtils.convertKeypadLettersToDigits(cons);
|
||||
if (phone.equals(cons)) {
|
||||
if (phone.equals(cons) && !PhoneNumberUtils.isWellFormedSmsAddress(phone)) {
|
||||
phone = "";
|
||||
} else {
|
||||
phone = phone.trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Uri uri = Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, Uri.encode(cons));
|
||||
String selection = String.format("%s=%s OR %s=%s OR %s=%s",
|
||||
Phone.TYPE,
|
||||
|
||||
@@ -117,7 +117,6 @@ public class RecipientsEditor extends MultiAutoCompleteTextView {
|
||||
int len = getText().length();
|
||||
|
||||
return end == len;
|
||||
|
||||
}
|
||||
|
||||
public int getRecipientCount() {
|
||||
@@ -196,19 +195,19 @@ public class RecipientsEditor extends MultiAutoCompleteTextView {
|
||||
}*/
|
||||
|
||||
public static CharSequence contactToToken(Recipient c) {
|
||||
String name = c.getName();
|
||||
String number = c.getNumber();
|
||||
SpannableString s = new SpannableString(RecipientsFormatter.formatNameAndNumber(name, number));
|
||||
int len = s.length();
|
||||
String name = c.getName();
|
||||
String number = c.getNumber();
|
||||
SpannableString s = new SpannableString(RecipientsFormatter.formatNameAndNumber(name, number));
|
||||
int len = s.length();
|
||||
|
||||
if (len == 0) {
|
||||
return s;
|
||||
}
|
||||
if (len == 0) {
|
||||
return s;
|
||||
}
|
||||
|
||||
s.setSpan(new Annotation("number", c.getNumber()), 0, len,
|
||||
s.setSpan(new Annotation("number", c.getNumber()), 0, len,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
||||
return s;
|
||||
return s;
|
||||
}
|
||||
|
||||
public void populate(Recipients list) {
|
||||
@@ -229,7 +228,6 @@ public class RecipientsEditor extends MultiAutoCompleteTextView {
|
||||
x -= getCompoundPaddingLeft();
|
||||
y -= getExtendedPaddingTop();
|
||||
|
||||
|
||||
x += getScrollX();
|
||||
y += getScrollY();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user