WIP make things compile

This commit is contained in:
Ryan ZHAO
2021-01-14 13:54:21 +11:00
parent 8e8abcbe81
commit fcb71961d6
6 changed files with 6 additions and 18 deletions

View File

@@ -10,7 +10,6 @@ import android.text.TextUtils;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import com.amulyakhare.textdrawable.TextDrawable;
@@ -82,10 +81,4 @@ public class GeneratedContactPhoto implements FallbackContactPhoto {
return builder.toString();
}
}
@Override
public Drawable asCallCard(Context context) {
return AppCompatResources.getDrawable(context, R.drawable.ic_person_large);
}
}

View File

@@ -53,11 +53,6 @@ public class ResourceContactPhoto implements FallbackContactPhoto {
return new ExpandingLayerDrawable(new Drawable[] {background, foreground, gradient});
}
@Override
public Drawable asCallCard(Context context) {
return AppCompatResources.getDrawable(context, callCardResourceId);
}
private static class ExpandingLayerDrawable extends LayerDrawable {
public ExpandingLayerDrawable(Drawable[] layers) {
super(layers);

View File

@@ -33,7 +33,7 @@ class MessageSendJob(val message: Message, val destination: Destination) : Job {
if(MessagingConfiguration.shared.storage.getAttachmentUploadJob(it.attachmentId) != null) {
// Wait for it to finish
} else {
val job = AttachmentUploadJob(it.attachmentId, message.threadID!!, message, id!!)
val job = AttachmentUploadJob(it.attachmentId, message.threadID!!.toString(), message, id!!)
JobQueue.shared.add(job)
}
}

View File

@@ -35,10 +35,8 @@ public final class RecipientExporter {
}
private static void addAddressToIntent(Intent intent, Address address) {
if (address.isPhone()) {
intent.putExtra(ContactsContract.Intents.Insert.PHONE, address.toPhoneString());
} else if (address.isEmail()) {
intent.putExtra(ContactsContract.Intents.Insert.EMAIL, address.toEmailString());
if (address.isContact()) {
intent.putExtra(ContactsContract.Intents.Insert.PHONE, address.toString());
} else {
throw new RuntimeException("Cannot export Recipient with neither phone nor email");
}