mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
minor fixes, debugging.
This commit is contained in:
@@ -49,6 +49,7 @@ import org.thoughtcrime.securesms.util.ListenableFutureTask;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
@@ -629,6 +630,36 @@ public class Recipient implements RecipientModifiedListener {
|
||||
listener.onModified(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Recipient{" +
|
||||
"listeners=" + listeners +
|
||||
", address=" + address +
|
||||
", participants=" + participants +
|
||||
", name='" + name + '\'' +
|
||||
", customLabel='" + customLabel + '\'' +
|
||||
", resolving=" + resolving +
|
||||
", systemContactPhoto=" + systemContactPhoto +
|
||||
", groupAvatarId=" + groupAvatarId +
|
||||
", contactUri=" + contactUri +
|
||||
", messageRingtone=" + messageRingtone +
|
||||
", callRingtone=" + callRingtone +
|
||||
", mutedUntil=" + mutedUntil +
|
||||
", blocked=" + blocked +
|
||||
", messageVibrate=" + messageVibrate +
|
||||
", callVibrate=" + callVibrate +
|
||||
", expireMessages=" + expireMessages +
|
||||
", defaultSubscriptionId=" + defaultSubscriptionId +
|
||||
", registered=" + registered +
|
||||
", color=" + color +
|
||||
", seenInviteReminder=" + seenInviteReminder +
|
||||
", profileKey=" + Arrays.toString(profileKey) +
|
||||
", profileName='" + profileName + '\'' +
|
||||
", profileAvatar='" + profileAvatar + '\'' +
|
||||
", profileSharing=" + profileSharing +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onModified(Recipient recipient) {
|
||||
notifyListeners();
|
||||
|
||||
@@ -203,8 +203,11 @@ public class Util {
|
||||
public static boolean isOwnNumber(Context context, Address address) {
|
||||
if (address.isGroup()) return false;
|
||||
if (address.isEmail()) return false;
|
||||
if (address.isDcChat()) return false;
|
||||
String localNumber = TextSecurePreferences.getLocalNumber(context);
|
||||
if (TextUtils.isEmpty(localNumber)) return false;
|
||||
|
||||
return TextSecurePreferences.getLocalNumber(context).equals(address.toPhoneString());
|
||||
return localNumber.equals(address.toPhoneString());
|
||||
}
|
||||
|
||||
public static void readFully(InputStream in, byte[] buffer) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user